aboutsummaryrefslogtreecommitdiffstats
path: root/ssl/s3_lib.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>1999-05-09 20:12:44 +0000
committerBodo Möller <bodo@openssl.org>1999-05-09 20:12:44 +0000
commitca8e5b9b8ad3c199943ad7850bf66bc03279c0b9 (patch)
tree6826d0a788880b08e6774c31d8c0629ee855e53c /ssl/s3_lib.c
parent8d1157c71c477be91bbf276ff0b0e6b1d4c139c5 (diff)
downloadopenssl-ca8e5b9b8ad3c199943ad7850bf66bc03279c0b9.tar.gz
Create a duplicate of the SSL_CTX's CERT in SSL_new instead of copying
pointers. The cert_st handling is changed by this in various ways. Submitted by: Reviewed by: PR:
Diffstat (limited to 'ssl/s3_lib.c')
-rw-r--r--ssl/s3_lib.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/ssl/s3_lib.c b/ssl/s3_lib.c
index c41e2548bd..2fa3c4c0f8 100644
--- a/ssl/s3_lib.c
+++ b/ssl/s3_lib.c
@@ -584,7 +584,7 @@ long ssl3_ctrl(SSL *s, int cmd, long larg, char *parg)
#endif
0)
{
- if (!ssl_cert_instantiate(&s->cert, s->ctx->default_cert))
+ if (!ssl_cert_inst(&s->cert))
{
SSLerr(SSL_F_SSL3_CTRL, ERR_R_MALLOC_FAILURE);
return(0);
@@ -677,7 +677,7 @@ long ssl3_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg)
{
CERT *cert;
- cert=ctx->default_cert;
+ cert=ctx->cert;
switch (cmd)
{
@@ -841,11 +841,8 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *have,
CERT *cert;
unsigned long alg,mask,emask;
- /* Lets see which ciphers we can supported */
- if (s->cert != NULL)
- cert=s->cert;
- else
- cert=s->ctx->default_cert;
+ /* Let's see which ciphers we can support */
+ cert=s->cert;
sk_SSL_CIPHER_set_cmp_func(pref,ssl_cipher_ptr_id_cmp);
@@ -862,7 +859,7 @@ SSL_CIPHER *ssl3_choose_cipher(SSL *s, STACK_OF(SSL_CIPHER) *have,
{
c=sk_SSL_CIPHER_value(have,i);
- ssl_set_cert_masks(cert,s->ctx->default_cert,c);
+ ssl_set_cert_masks(cert,c);
mask=cert->mask;
emask=cert->export_mask;