Revise ssl code to use a CERT_PKEY structure when outputting a

certificate chain instead of an X509 structure.

This makes it easier to enhance code in future and the chain
output functions have access to the CERT_PKEY structure being
used.
This commit is contained in:
Dr. Stephen Henson
2012-01-26 16:00:34 +00:00
parent 4379d0e457
commit c526ed410c
9 changed files with 28 additions and 21 deletions

View File

@@ -321,13 +321,13 @@ int ssl3_send_change_cipher_spec(SSL *s, int a, int b)
return(ssl3_do_write(s,SSL3_RT_CHANGE_CIPHER_SPEC));
}
unsigned long ssl3_output_cert_chain(SSL *s, X509 *x)
unsigned long ssl3_output_cert_chain(SSL *s, CERT_PKEY *cpk)
{
unsigned char *p;
unsigned long l=7;
BUF_MEM *buf = s->init_buf;
if (!ssl_add_cert_chain(s, x, &l))
if (!ssl_add_cert_chain(s, cpk, &l))
return 0;
l-=7;