Tagging has now been done, update to the next version (it's not quite
[openssl.git] / apps / x509.c
index 407f839504e64160cf56cb4dcbbcd4ee5a636f06..2d6384184c9e08d2f3d82145a787718cab038ab1 100644 (file)
@@ -126,7 +126,7 @@ static char *x509_usage[]={
 " -md2/-md5/-sha1/-mdc2 - digest to use\n",
 " -extfile        - configuration file with X509V3 extensions to add\n",
 " -extensions     - section from config file with X509V3 extensions to add\n",
-" -crlext         - delete extensions before signing and input certificate\n",
+" -clrext         - delete extensions before signing and input certificate\n",
 NULL
 };
 
@@ -365,8 +365,15 @@ int MAIN(int argc, char **argv)
                        aliasout= ++num;
                else if (strcmp(*argv,"-CAcreateserial") == 0)
                        CA_createserial= ++num;
+               else if (strcmp(*argv,"-clrext") == 0)
+                       clrext = 1;
+#if 1 /* stay backwards-compatible with 0.9.5; this should go away soon */
                else if (strcmp(*argv,"-crlext") == 0)
+                       {
+                       BIO_printf(bio_err,"use -clrext instead of -crlext\n");
                        clrext = 1;
+                       }
+#endif
                else if ((md_alg=EVP_get_digestbyname(*argv + 1)))
                        {
                        /* ok */
@@ -555,7 +562,7 @@ bad:
                        }
                }
 
-       if(alias) X509_alias_rset(x, (unsigned char *)alias, -1);
+       if(alias) X509_alias_set1(x, (unsigned char *)alias, -1);
 
        if(clrtrust) X509_trust_clear(x);
        if(clrreject) X509_reject_clear(x);
@@ -599,7 +606,7 @@ bad:
                        else if (aliasout == i)
                                {
                                unsigned char *alstr;
-                               alstr = X509_alias_iget(x, NULL);
+                               alstr = X509_alias_get0(x, NULL);
                                if(alstr) BIO_printf(STDout,"%s\n", alstr);
                                else BIO_puts(STDout,"<No Alias>\n");
                                }
@@ -614,7 +621,7 @@ bad:
                                BIO_printf(STDout, "Certificate purposes:\n");
                                for(j = 0; j < X509_PURPOSE_get_count(); j++)
                                        {
-                                       ptmp = X509_PURPOSE_iget(j);
+                                       ptmp = X509_PURPOSE_get0(j);
                                        purpose_print(STDout, x, ptmp);
                                        }
                                }