RT4047: Set reference count earlier
Make sure it's valid very early. Signed-off-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:

committed by
Rich Salz

parent
20ca916d7d
commit
0e04674e96
@@ -192,6 +192,7 @@ CERT *ssl_cert_dup(CERT *cert)
|
||||
return (NULL);
|
||||
}
|
||||
|
||||
ret->references = 1;
|
||||
ret->key = &ret->pkeys[cert->key - cert->pkeys];
|
||||
|
||||
#ifndef OPENSSL_NO_RSA
|
||||
@@ -278,7 +279,6 @@ CERT *ssl_cert_dup(CERT *cert)
|
||||
}
|
||||
}
|
||||
|
||||
ret->references = 1;
|
||||
/* Configured sigalgs copied across */
|
||||
if (cert->conf_sigalgs) {
|
||||
ret->conf_sigalgs = OPENSSL_malloc(cert->conf_sigalgslen);
|
||||
|
Reference in New Issue
Block a user