How to change utc time?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to change utc time?

David Templar
This is a follow on from my last post as the text lost its formatting.

How do I change the utc time of a certificate to a smaller format
(whilst creating a cert):
180821070000Z - there are lots of zeros in this format, openssl gives less.

Also, how do I add a friendly name object - I have tried adding 2 common
names but maybe I am doing something wrong....
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: How to change utc time?

JoelKatz

> This is a follow on from my last post as the text lost its formatting.
>
> How do I change the utc time of a certificate to a smaller format
> (whilst creating a cert):
> 180821070000Z - there are lots of zeros in this format, openssl
> gives less.

        There is never more than one way to represent the same information in DER,
or else signatures would not work. 11.8.5 of the BER specification tells you
the number of zeroes required:

11.8 UTCTime

11.8.1 The encoding shall terminate with "Z", as described in the ITU-T
X.680 | ISO/IEC 8824-1 clause on UTCTime.

11.8.2 The seconds element shall always be present.

11.8.3 Midnight (GMT) shall be represented in the form: "YYMMDD000000Z"
where "YYMMDD" represents the day following the midnight in question.

11.8.4 Examples of valid representations

"920521000000Z"
"920622123421Z"
"920722132100Z"

11.8.5 Examples of invalid representations
"920520240000Z" (midnight represented incorrectly)
"9207221321Z" (seconds of 00 omitted)

        DS


______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       [hidden email]
Automated List Manager                           [hidden email]