util/mkstack.pl now generates entire safestack.h
[openssl.git] / ssl / ssl_lib.c
index 3392d1a6a9805b17bdbd3cb93bd6094e22b06fcc..2bb1866b8c216dd43484fdb9f684cbb25f64aa9f 100644 (file)
@@ -245,7 +245,6 @@ int SSL_clear(SSL *s)
 
     s->first_packet = 0;
 
-#if 1
     /*
      * Check to see if we were changed into a different method, if so, revert
      * back if we are not doing session-id reuse.
@@ -257,7 +256,6 @@ int SSL_clear(SSL *s)
         if (!s->method->ssl_new(s))
             return (0);
     } else
-#endif
         s->method->ssl_clear(s);
     return (1);
 }
@@ -1134,6 +1132,13 @@ long SSL_ctrl(SSL *s, int cmd, long larg, void *parg)
             return (int)s->cert->ciphers_rawlen;
         } else
             return ssl_put_cipher_by_char(s, NULL, NULL);
+    case SSL_CTRL_GET_EXTMS_SUPPORT:
+        if (!s->session || SSL_in_init(s) || s->in_handshake)
+               return -1;
+       if (s->session->flags & SSL_SESS_FLAG_EXTMS)
+            return 1;
+        else
+            return 0;
     default:
         return (s->method->ssl_ctrl(s, cmd, larg, parg));
     }
@@ -3594,8 +3599,4 @@ void *SSL_CTX_get0_security_ex_data(const SSL_CTX *ctx)
     return ctx->cert->sec_ex;
 }
 
-IMPLEMENT_STACK_OF(SSL_CIPHER)
-
-IMPLEMENT_STACK_OF(SSL_COMP)
-
 IMPLEMENT_OBJ_BSEARCH_GLOBAL_CMP_FN(SSL_CIPHER, SSL_CIPHER, ssl_cipher_id);