Use same name in the definition as in the header file declaration :-/
[openssl.git] / ssl / s3_lib.c
index c41e2548bdbd89ead141e7da579db38e8ba4d42b..aeff6b5c5bc6d7319ffe52345dc39b24f54c8dac 100644 (file)
@@ -67,7 +67,8 @@ const char *ssl3_version_str="SSLv3" OPENSSL_VERSION_PTEXT;
 #define SSL3_NUM_CIPHERS       (sizeof(ssl3_ciphers)/sizeof(SSL_CIPHER))
 
 static long ssl3_default_timeout(void );
-SSL_CIPHER ssl3_ciphers[]={
+
+OPENSSL_GLOBAL SSL_CIPHER ssl3_ciphers[]={
 /* The RSA ciphers */
 /* Cipher 01 */
        {
@@ -584,7 +585,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 +678,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 +842,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 +860,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;