Update usage info
[openssl.git] / ssl / ssl_lib.c
index 8a9d2894f1b7d4f0981fb364c770a00669916695..3109708480b9fcadb02196e503a474bd8407f923 100644 (file)
@@ -81,18 +81,6 @@ OPENSSL_GLOBAL SSL3_ENC_METHOD ssl3_undef_enc_method={
        (int (*)(SSL *, EVP_MD_CTX *, EVP_MD_CTX *, const char*, int, unsigned char *))ssl_undefined_function
        };
 
-union rsa_fn_to_char_u
-       {
-       char *char_p;
-       RSA *(*fn_p)(SSL *, int, int);
-       };
-
-union dh_fn_to_char_u
-       {
-       char *char_p;
-       DH *(*fn_p)(SSL *, int, int);
-       };
-
 int SSL_clear(SSL *s)
        {
        int state;
@@ -107,10 +95,17 @@ int SSL_clear(SSL *s)
        s->hit=0;
        s->shutdown=0;
 
-#if 0
+#if 0 /* Disabled since version 1.10 of this file (early return not
+       * needed because SSL_clear is not called when doing renegotiation) */
        /* This is set if we are doing dynamic renegotiation so keep
         * the old cipher.  It is sort of a SSL_clear_lite :-) */
        if (s->new_session) return(1);
+#else
+       if (s->new_session)
+               {
+               SSLerr(SSL_F_SSL_CLEAR,SSL_R_INTERNAL_ERROR);
+               return 0;
+               }
 #endif
 
        state=s->state; /* Keep to check if we throw away the session-id */
@@ -803,6 +798,11 @@ long SSL_callback_ctrl(SSL *s, int cmd, void (*fp)())
                }
        }
 
+struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx)
+       {
+       return ctx->sessions;
+       }
+
 long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd,long larg,char *parg)
        {
        long l;
@@ -1360,10 +1360,8 @@ void ssl_set_cert_masks(CERT *c, SSL_CIPHER *cipher)
                emask|=SSL_aDSS;
                }
 
-#ifdef SSL_ALLOW_ADH
        mask|=SSL_aNULL;
        emask|=SSL_aNULL;
-#endif
 
        c->mask=mask;
        c->export_mask=emask;