Convert save_serial() to work like save_index(), and add a
[openssl.git] / apps / x509.c
index 64eb83dd6e2edfc01804fbde8b6b54e1cf380319..ed9e40574aabbca9ff3d5d07b75fc09ef13566f0 100644 (file)
@@ -1037,7 +1037,6 @@ end:
 static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create)
        {
        char *buf = NULL, *p;
-       MS_STATIC char buf2[1024];
        ASN1_INTEGER *bs = NULL;
        BIGNUM *serial = NULL;
 
@@ -1065,7 +1064,7 @@ static ASN1_INTEGER *x509_load_serial(char *CAfile, char *serialfile, int create
        if (!BN_add_word(serial,1))
                { BIO_printf(bio_err,"add_word failure\n"); goto end; }
 
-       if (!save_serial(buf, serial, &bs)) goto end;
+       if (!save_serial(buf, NULL, serial, &bs)) goto end;
 
  end:
        if (buf) OPENSSL_free(buf);