Fix for PEM_X509_INFO_read_bio.
authorKaspar Brand <ossl-rt@velox.ch>
Tue, 6 Aug 2013 15:01:47 +0000 (16:01 +0100)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 6 Aug 2013 15:05:19 +0000 (16:05 +0100)
PR: 3028
Fix bug introduced in PEM_X509_INFO_bio which wouldn't process RSA keys
correctly if they appeared first.
(cherry picked from commit 5ae8d6bcbaff99423a2608559d738a3fcf7ed6dc)

crypto/pem/pem_info.c

index 1b2be527edde007bf86c894d1f3b70f75bc6117e..cc7f24a9c1cf491ae3092b9dc4aa8fe05e927ef0 100644 (file)
@@ -167,6 +167,7 @@ start:
 #ifndef OPENSSL_NO_RSA
                        if (strcmp(name,PEM_STRING_RSA) == 0)
                        {
+                       d2i=(D2I_OF(void))d2i_RSAPrivateKey;
                        if (xi->x_pkey != NULL) 
                                {
                                if (!sk_X509_INFO_push(ret,xi)) goto err;