Latest update.
This commit is contained in:
+8
-12
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -28,6 +28,10 @@
|
||||
# include <openssl/dsa.h>
|
||||
#endif
|
||||
|
||||
DEFINE_STACK_OF(ASN1_OBJECT)
|
||||
DEFINE_STACK_OF(X509_EXTENSION)
|
||||
DEFINE_STACK_OF_STRING()
|
||||
|
||||
#undef POSTFIX
|
||||
#define POSTFIX ".srl"
|
||||
#define DEF_DAYS 30
|
||||
@@ -117,7 +121,7 @@ const OPTIONS x509_options[] = {
|
||||
{"issuer_hash_old", OPT_ISSUER_HASH_OLD, '-',
|
||||
"Print old-style (MD5) subject hash value"},
|
||||
#endif
|
||||
{"nameopt", OPT_NAMEOPT, 's', "Various certificate name options"},
|
||||
{"nameopt", OPT_NAMEOPT, 's', "Certificate subject/issuer name printing options"},
|
||||
|
||||
OPT_SECTION("Certificate"),
|
||||
{"startdate", OPT_STARTDATE, '-', "Set notBefore field"},
|
||||
@@ -568,18 +572,10 @@ int x509_main(int argc, char **argv)
|
||||
|
||||
if (reqfile) {
|
||||
EVP_PKEY *pkey;
|
||||
BIO *in;
|
||||
|
||||
in = bio_open_default(infile, 'r', informat);
|
||||
if (in == NULL)
|
||||
req = load_csr(infile, informat, "certificate request input");
|
||||
if (req == NULL)
|
||||
goto end;
|
||||
req = PEM_read_bio_X509_REQ(in, NULL, NULL, NULL);
|
||||
BIO_free(in);
|
||||
|
||||
if (req == NULL) {
|
||||
ERR_print_errors(bio_err);
|
||||
goto end;
|
||||
}
|
||||
|
||||
if ((pkey = X509_REQ_get0_pubkey(req)) == NULL) {
|
||||
BIO_printf(bio_err, "error unpacking public key\n");
|
||||
|
||||
Reference in New Issue
Block a user