X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=apps%2Fpkcs8.c;h=0874370d0c552545d4cb2758d4059b5502c21c9a;hb=9995007afff6384866f8db4ab986b9a3edb97ecd;hp=3592a0f1dc21b13ac908a921bd3f7bd0cd742aa1;hpb=90edd7ad0fb0d8b1eb5bb6d587a6359f17a39230;p=oweals%2Fopenssl.git diff --git a/apps/pkcs8.c b/apps/pkcs8.c index 3592a0f1dc..0874370d0c 100644 --- a/apps/pkcs8.c +++ b/apps/pkcs8.c @@ -66,7 +66,7 @@ int pkcs8_main(int argc, char **argv) char *infile = NULL, *outfile = NULL; char *passinarg = NULL, *passoutarg = NULL, *prog; #ifndef OPENSSL_NO_UI - char pass[50]; + char pass[APP_PASS_LEN]; #endif char *passin = NULL, *passout = NULL, *p8pass = NULL; OPTION_CHOICE o; @@ -238,7 +238,7 @@ int pkcs8_main(int argc, char **argv) #ifndef OPENSSL_NO_UI p8pass = pass; if (EVP_read_pw_string - (pass, sizeof pass, "Enter Encryption Password:", 1)) { + (pass, sizeof(pass), "Enter Encryption Password:", 1)) { X509_ALGOR_free(pbe); goto end; } @@ -300,7 +300,7 @@ int pkcs8_main(int argc, char **argv) else if (1) { #ifndef OPENSSL_NO_UI p8pass = pass; - if (EVP_read_pw_string(pass, sizeof pass, "Enter Password:", 0)) { + if (EVP_read_pw_string(pass, sizeof(pass), "Enter Password:", 0)) { BIO_printf(bio_err, "Can't read Password\n"); goto end; } @@ -343,6 +343,7 @@ int pkcs8_main(int argc, char **argv) X509_SIG_free(p8); PKCS8_PRIV_KEY_INFO_free(p8inf); EVP_PKEY_free(pkey); + release_engine(e); BIO_free_all(out); BIO_free(in); OPENSSL_free(passin);