two typo fixes
[openssl.git] / apps / ca.c
index 376c8a553b85bc624e7953fd1fe79f6f07bac5d3..4bf7b527838e4b00c79f71e956352322d4791155 100644 (file)
--- a/apps/ca.c
+++ b/apps/ca.c
@@ -83,7 +83,7 @@
 
 /* Additional revocation information types */
 
-#define REV_NONE                0 /* No addditional information */
+#define REV_NONE                0 /* No additional information */
 #define REV_CRL_REASON          1 /* Value is CRL reason code */
 #define REV_HOLD                2 /* Value is hold instruction */
 #define REV_KEY_COMPROMISE      3 /* Value is cert key compromise time */
@@ -131,7 +131,7 @@ static int do_updatedb(CA_DB *db);
 static int check_time_format(const char *str);
 char *make_revocation_str(int rev_type, char *rev_arg);
 int make_revoked(X509_REVOKED *rev, const char *str);
-static int old_entry_print(ASN1_OBJECT *obj, ASN1_STRING *str);
+static int old_entry_print(const ASN1_OBJECT *obj, const ASN1_STRING *str);
 
 static CONF *extconf = NULL;
 static int preserve = 0;
@@ -194,7 +194,8 @@ OPTIONS ca_options[] = {
     {"spkac", OPT_SPKAC, '<',
      "File contains DN and signed public key and challenge"},
     {"revoke", OPT_REVOKE, '<', "Revoke a cert (given in file)"},
-    {"valid", OPT_VALID, 's'},
+    {"valid", OPT_VALID, 's',
+     "Add a Valid(not-revoked) DB entry about a cert (given in file)"},
     {"extensions", OPT_EXTENSIONS, 's',
      "Extension section (override value in config file)"},
     {"extfile", OPT_EXTFILE, '<',
@@ -987,7 +988,7 @@ end_of_options:
             x = sk_X509_value(cert_sk, i);
 
             j = ASN1_STRING_length(serialNumber);
-            p = (const char *)ASN1_STRING_data(serialNumber);
+            p = (const char *)ASN1_STRING_get0_data(serialNumber);
 
             if (strlen(outdir) >= (size_t)(j ? BSIZE - j * 2 - 6 : BSIZE - 8)) {
                 BIO_printf(bio_err, "certificate file name too long\n");
@@ -2412,7 +2413,7 @@ int make_revoked(X509_REVOKED *rev, const char *str)
     return ret;
 }
 
-static int old_entry_print(ASN1_OBJECT *obj, ASN1_STRING *str)
+static int old_entry_print(const ASN1_OBJECT *obj, const ASN1_STRING *str)
 {
     char buf[25], *pbuf, *p;
     int j;