PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Neu abgelaufene Zertifikate



DragonMaster
17.07.06, 10:35
Ich möchte ein paar neue Zertifikate für Stunnel einrichten. Dafür hab ich erst einmal ein CA-Zertifikat erstellt.

Das mit dem Komando:

openssl req -new -x509 -nodes -keyout demoCA/private/cakey.pem -out demoCA/cacert.pem -days 365000

Wenn ich nun prüfe wann das Zertifikat abgelaufen sein wird, zeigt er mir das Jahr 1917 an.


Das selbe hab ich auch mit dem Wrapper-Tools "CA.sh" probiert. Selbe Ergebnis. Kann mir mal einer sagen wo das Problem liegt?

Tomek
17.07.06, 10:38
Sind 1000 Jahre nicht vielleicht etwas übertrieben? Versuche es doch mal 3650 Tagen.

DragonMaster
17.07.06, 10:43
Hab es mit sogar mit 1 Tag versuch. Irgendwie fällt das Ablaufdatum immer in der Vergangenheit. Mit 365 Tagen sollte es eigentlich 2008 sein. Datum liegt aber bei 2005 :/

DragonMaster
17.07.06, 11:11
So..hier mal was konkretes....


openssl req -new -x509 -nodes -keyout demoCA/private/cakey.pem -out demoCA/cacert.pem -days 1

Ist abgelaufen am

notAfter=Jul 18 10:05:38 2006 GMT Was ja auch OK ist. Soweit.


Nun aber

openssl req -new -x509 -nodes -keyout demoCA/private/cakey.pem -out demoCA/cacert.pem -days 365

Das selbe in Grün, nur mit 365 Tagen, dann heißts auf einmal

notAfter=Jul 17 10:06:57 2007 GMT

marce
17.07.06, 11:24
und was stimmt daran nun nicht?

choener
17.07.06, 11:26
Öhm, 2007? ...

marce
17.07.06, 11:29
ist das nicht in 1 Jahr? Also wenn ich meinem Kalender vertraue, dann schon...

DragonMaster
17.07.06, 12:05
Stimmt... :ugly:


Passt, aber es gibt noch nen kleinen Prüffehler. Hab das mal für die nächsten 100 Jahre gemacht.


openssl req -new -x509 -nodes -keyout demoCA/private/cakey.pem -out demoCA/cacert.pem -days 36500

Einfach mal aus spass. Und siehe da

notAfter=May 17 04:32:46 1970 GMT

Für die nächsten 1000 Jahre

notAfter=Jan 23 07:18:41 1917 GMT

Pufferüberlauf?

oli993
17.07.06, 12:19
Jahr-2038-Problem?

marce
17.07.06, 12:21
klingt fast schon zu einfach :-)

temir
18.07.06, 11:53
man clock | col -b | less
....
date _______________ A specific month and day with optional year.
The accept able formats are mm/dd?/yy?, monthname dd ?, yy?, dd monthname ?yy?, day, dd monthname yy, ?CC?yymmdd, ?CC?yy-mm-dd, dd-monthname-?CC?yy.
The default year is the current year. If the year is less than 100, we treat the years 00-68 as 2000-2068 and the years 69-99 as 1969-1999.
Not all platforms can represent the years 38-70, so an error may result if these years are used.
....

Nur so am Rande: würden 30-40 Jahre für eine CA nicht reichen? - Danach ist man eh in Rente...