- {"CAform", OPT_CAFORM, 'F', "CA format - default PEM"},
- {"CAkeyform", OPT_CAKEYFORM, 'F', "CA key format - default PEM"},
- {"sigopt", OPT_SIGOPT, 's', "Signature parameter in n:v form"},
- {"force_pubkey", OPT_FORCE_PUBKEY, '<'},
- {"next_serial", OPT_NEXT_SERIAL, '-'},
- {"clrreject", OPT_CLRREJECT, '-'},
- {"badsig", OPT_BADSIG, '-', "Corrupt last byte of certificate signature (for test)"},
- {"", OPT_MD, '-', "Any supported digest"},
-#ifndef OPENSSL_NO_MD5
- {"subject_hash_old", OPT_SUBJECT_HASH_OLD, '-',
- "Print old-style (MD5) issuer hash value"},
- {"issuer_hash_old", OPT_ISSUER_HASH_OLD, '-',
- "Print old-style (MD5) subject hash value"},
-#endif
+
+ OPT_SECTION("Certificate output"),
+ {"set_serial", OPT_SET_SERIAL, 's',
+ "Serial number to use, overrides -CAserial"},
+ {"next_serial", OPT_NEXT_SERIAL, '-',
+ "Increment current certificate serial number"},
+ {"days", OPT_DAYS, 'n',
+ "Number of days until newly generated certificate expires - default 30"},
+ {"preserve_dates", OPT_PRESERVE_DATES, '-',
+ "Preserve existing validity dates"},
+ {"subj", OPT_SUBJ, 's', "Set or override certificate subject (and issuer)"},
+ {"force_pubkey", OPT_FORCE_PUBKEY, '<',
+ "Place the given key in new certificate"},
+ {"clrext", OPT_CLREXT, '-',
+ "Do not take over any extensions from the source certificate or request"},
+ {"extfile", OPT_EXTFILE, '<', "Config file with X509V3 extensions to add"},
+ {"extensions", OPT_EXTENSIONS, 's',
+ "Section of extfile to use - default: unnamed section"},
+ {"sigopt", OPT_SIGOPT, 's', "Signature parameter, in n:v form"},
+ {"badsig", OPT_BADSIG, '-',
+ "Corrupt last byte of certificate signature (for test)"},
+ {"", OPT_MD, '-', "Any supported digest, used for signing and printing"},
+
+ OPT_SECTION("Micro-CA"),
+ {"CA", OPT_CA, '<',
+ "Use the given CA certificate, conflicts with -signkey"},
+ {"CAform", OPT_CAFORM, 'F', "CA cert format (PEM/DER/P12); has no effect"},
+ {"CAkey", OPT_CAKEY, 's', "The corresponding CA key; default is -CA arg"},
+ {"CAkeyform", OPT_CAKEYFORM, 'E',
+ "CA key format (ENGINE, other values ignored)"},
+ {"CAserial", OPT_CASERIAL, 's',
+ "File that keeps track of CA-generated serial number"},
+ {"CAcreateserial", OPT_CACREATESERIAL, '-',
+ "Create CA serial number file if it does not exist"},
+
+ OPT_SECTION("Certificate trust output"),
+ {"trustout", OPT_TRUSTOUT, '-', "Mark certificate PEM output as trusted"},
+ {"setalias", OPT_SETALIAS, 's', "Set certificate alias (nickname)"},
+ {"clrtrust", OPT_CLRTRUST, '-', "Clear all trusted purposes"},
+ {"addtrust", OPT_ADDTRUST, 's', "Trust certificate for a given purpose"},
+ {"clrreject", OPT_CLRREJECT, '-',
+ "Clears all the prohibited or rejected uses of the certificate"},
+ {"addreject", OPT_ADDREJECT, 's',
+ "Reject certificate for a given purpose"},
+
+ OPT_R_OPTIONS,