Add verbosity
[openssl.git] / apps / x509.c
index aa06462b9f41b3c506ccab6a4fd1f6afeaa2b35e..9709628df35ac0c85f588ce5255bb0d0a157f8cd 100644 (file)
@@ -122,7 +122,7 @@ static char *x509_usage[]={
 " -CAkey arg      - set the CA key, must be PEM format\n",
 "                   missing, it is assumed to be in the CA file.\n",
 " -CAcreateserial - create serial number file if it does not exist\n",
-" -CAserial       - serial file\n",
+" -CAserial arg   - serial file\n",
 " -set_serial     - serial number to use\n",
 " -text           - print the certificate in text form\n",
 " -C              - print out C code forms\n",
@@ -479,7 +479,7 @@ bad:
 
        if (extfile)
                {
-               long errorline;
+               long errorline = -1;
                X509V3_CTX ctx2;
                extconf = NCONF_new(NULL);
                if (!NCONF_load(extconf, extfile,&errorline))
@@ -770,10 +770,11 @@ bad:
                                int y,z;
 
                                X509_NAME_oneline(X509_get_subject_name(x),
-                                       buf,256);
+                                       buf,sizeof buf);
                                BIO_printf(STDout,"/* subject:%s */\n",buf);
                                m=X509_NAME_oneline(
-                                       X509_get_issuer_name(x),buf,256);
+                                       X509_get_issuer_name(x),buf,
+                                       sizeof buf);
                                BIO_printf(STDout,"/* issuer :%s */\n",buf);
 
                                z=i2d_X509(x,NULL);
@@ -1028,7 +1029,7 @@ end:
        sk_ASN1_OBJECT_pop_free(reject, ASN1_OBJECT_free);
        if (passin) OPENSSL_free(passin);
        apps_shutdown();
-       EXIT(ret);
+       OPENSSL_EXIT(ret);
        }
 
 static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
@@ -1086,7 +1087,7 @@ static ASN1_INTEGER *load_serial(char *CAfile, char *serialfile, int create)
                }
        else 
                {
-               if (!a2i_ASN1_INTEGER(io,bs,buf2,1024))
+               if (!a2i_ASN1_INTEGER(io,bs,buf2,sizeof buf2))
                        {
                        BIO_printf(bio_err,"unable to load serial number from %s\n",buf);
                        ERR_print_errors(bio_err);