fix incorrect strength bit values for certain Kerberos ciphersuites
[openssl.git] / ssl / t1_meth.c
index 512c2078e763740c939fa46ee9ea5f2988e3054c..6ce7c0bbf5856f6bcf0fd56a9c2dbeafded4f0cc 100644 (file)
  */
 
 #include <stdio.h>
-#include "objects.h"
+#include <openssl/objects.h>
 #include "ssl_locl.h"
 
-static SSL_METHOD *tls1_get_method(ver)
-int ver;
+static const SSL_METHOD *tls1_get_method(int ver);
+static const SSL_METHOD *tls1_get_method(int ver)
        {
        if (ver == TLS1_VERSION)
                return(TLSv1_method());
@@ -69,20 +69,8 @@ int ver;
                return(NULL);
        }
 
-SSL_METHOD *TLSv1_method()
-       {
-       static int init=1;
-       static SSL_METHOD TLSv1_data;
-
-       if (init)
-               {
-               init=0;
-               memcpy((char *)&TLSv1_data,(char *)tlsv1_base_method(),
-                       sizeof(SSL_METHOD));
-               TLSv1_data.ssl_connect=ssl3_connect;
-               TLSv1_data.ssl_accept=ssl3_accept;
-               TLSv1_data.get_ssl_method=tls1_get_method;
-               }
-       return(&TLSv1_data);
-       }
+IMPLEMENT_tls1_meth_func(TLSv1_method,
+                       ssl3_accept,
+                       ssl3_connect,
+                       tls1_get_method)