diff options
author | Adam Langley <agl@google.com> | 2015-06-12 16:28:27 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-06-12 16:28:27 +0000 |
commit | 9701a2fbe20a18d08253e84e8ec39d94db5376e0 (patch) | |
tree | 26c038b10145f502cb98f5675516a7ed6bd27fdb /src/crypto/pem/pem_pk8.c | |
parent | 82ea518198c8ce74418c90597ccf8f444d1154ab (diff) | |
parent | 53b272a2813a0b11f107d77100ff8805ada8fbd2 (diff) | |
download | external_boringssl-9701a2fbe20a18d08253e84e8ec39d94db5376e0.zip external_boringssl-9701a2fbe20a18d08253e84e8ec39d94db5376e0.tar.gz external_boringssl-9701a2fbe20a18d08253e84e8ec39d94db5376e0.tar.bz2 |
am 53b272a2: Bump revision of BoringSSL.
* commit '53b272a2813a0b11f107d77100ff8805ada8fbd2':
Bump revision of BoringSSL.
Diffstat (limited to 'src/crypto/pem/pem_pk8.c')
-rw-r--r-- | src/crypto/pem/pem_pk8.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crypto/pem/pem_pk8.c b/src/crypto/pem/pem_pk8.c index 383a524..035038e 100644 --- a/src/crypto/pem/pem_pk8.c +++ b/src/crypto/pem/pem_pk8.c @@ -124,8 +124,8 @@ static int do_pk8pkey(BIO *bp, EVP_PKEY *x, int isder, int nid, const EVP_CIPHER if(enc || (nid != -1)) { if(!kstr) { klen = 0; - if (cb) - klen = cb(buf, PEM_BUFSIZE, 1, u); + if (!cb) cb = PEM_def_callback; + klen = cb(buf, PEM_BUFSIZE, 1, u); if(klen <= 0) { OPENSSL_PUT_ERROR(PEM, do_pk8pkey, PEM_R_READ_KEY); PKCS8_PRIV_KEY_INFO_free(p8inf); @@ -160,8 +160,8 @@ EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, vo if(!p8) return NULL; klen = 0; - if (cb) - klen=cb(psbuf,PEM_BUFSIZE,0,u); + if (!cb) cb = PEM_def_callback; + klen=cb(psbuf,PEM_BUFSIZE,0,u); if (klen <= 0) { OPENSSL_PUT_ERROR(PEM, d2i_PKCS8PrivateKey_bio, PEM_R_BAD_PASSWORD_READ); X509_SIG_free(p8); |