blob: 3b6617f4ac67082a580494b204991905a7f2ff3d [file] [log] [blame]
Alexander Afanasyev151a8552014-04-11 00:54:43 -07001ndnsec-cert-gen
2===============
3
Davide Pesaventob310efb2019-04-11 22:10:24 -04004Synopsis
5--------
Alexander Afanasyev151a8552014-04-11 00:54:43 -07006
Davide Pesaventob310efb2019-04-11 22:10:24 -04007**ndnsec-cert-gen** [**-h**] [**-S** *timestamp*] [**-E** *timestamp*]
8[**-I** *info*]... [**-s** *signer*] [**-i** *issuer*] *file*
Alexander Afanasyev151a8552014-04-11 00:54:43 -07009
10Description
11-----------
12
Davide Pesaventob310efb2019-04-11 22:10:24 -040013:program:`ndnsec-cert-gen` takes a signing request as input and issues an
14identity certificate for the key in the signing request. The signing request
15can be created with :program:`ndnsec-key-gen` and can be re-generated with
16:program:`ndnsec-sign-req`.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070017
Davide Pesaventob310efb2019-04-11 22:10:24 -040018By default, the default key is used to sign the issued certificate.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070019
Davide Pesaventob310efb2019-04-11 22:10:24 -040020*file* is the name of a file that contains the signing request. If *file* is
21"-", the signing request is read from the standard input.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070022
Davide Pesaventob310efb2019-04-11 22:10:24 -040023The generated certificate is written to the standard output in base64 encoding.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070024
Alexander Afanasyev151a8552014-04-11 00:54:43 -070025Options
26-------
27
Davide Pesaventob310efb2019-04-11 22:10:24 -040028.. option:: -S <timestamp>, --not-before <timestamp>
Alexander Afanasyev151a8552014-04-11 00:54:43 -070029
Davide Pesaventob310efb2019-04-11 22:10:24 -040030 Date and time when the certificate becomes valid, in "YYYYMMDDhhmmss" format.
31 The default value is now.
Alexander Afanasyev151a8552014-04-11 00:54:43 -070032
Davide Pesaventob310efb2019-04-11 22:10:24 -040033.. option:: -E <timestamp>, --not-after <timestamp>
Alexander Afanasyev35109a12017-01-04 15:39:06 -080034
Davide Pesaventob310efb2019-04-11 22:10:24 -040035 Date and time when the certificate expires, in "YYYYMMDDhhmmss" format.
36 The default value is 365 days after the **--not-before** timestamp.
37
38.. option:: -I <info>, --info <info>
39
40 Other information to be included in the issued certificate. For example::
Alexander Afanasyev35109a12017-01-04 15:39:06 -080041
42 -I "affiliation Some Organization" -I "homepage http://home.page/"
Alexander Afanasyev151a8552014-04-11 00:54:43 -070043
Davide Pesaventob310efb2019-04-11 22:10:24 -040044.. option:: -s <signer>, --sign-id <signer>
Alexander Afanasyev151a8552014-04-11 00:54:43 -070045
Davide Pesaventob310efb2019-04-11 22:10:24 -040046 Signing identity. The default key/certificate of *signer* will be used to
47 sign the requested certificate. If this option is not specified, the system
48 default identity will be used.
Yingdi Yu0eb5d722014-06-10 15:06:25 -070049
Davide Pesaventob310efb2019-04-11 22:10:24 -040050.. option:: -i <issuer>, --issuer-id <issuer>
51
52 Issuer's ID to be included in the issued certificate name. The default
53 value is "NA".
54
55Example
56-------
Alexander Afanasyev151a8552014-04-11 00:54:43 -070057
58::
59
60 $ ndnsec-cert-gen -S 20140401000000 -E 20150331235959 -N "David"
Davide Pesaventob310efb2019-04-11 22:10:24 -040061 -I "2.5.4.10 'Some Organization'" -s /ndn/test request.cert
Alexander Afanasyev151a8552014-04-11 00:54:43 -070062 Bv0C9wc9CANuZG4IBHRlc3QIA0tFWQgFZGF2aWQIEWtzay0xMzk2OTEzMDU4MTk2
63 CAdJRC1DRVJUCAgAAAFFPp2g3hQDGAECFf0BdjCCAXIwIhgPMjAxNDA0MDEwMDAw
64 MDBaGA8yMDE1MDMzMTIzNTk1OVowKDAMBgNVBCkTBURhdmlkMBgGA1UEChMRU29t
65 ZSBPcmdhbml6YXRpb24wggEgMA0GCSqGSIb3DQEBAQUAA4IBDQAwggEIAoIBAQC0
66 urnS2nKcnXnMTESH2XqO+H8c6bCE6mmv+FMQ9hSfZVOHbX4kkiDmkcAAf8NCvwGr
67 kEat0NQIhKHFLFtofC5rXLheAo/UxgFA/9b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