update FAQ
[openssl.git] / ssl / s3_meth.c
index d70165c..cdddb17 100644 (file)
  */
 
 #include <stdio.h>
-#include "objects.h"
+#include <openssl/objects.h>
 #include "ssl_locl.h"
 
-#ifndef NOPROTO
-static SSL_METHOD *ssl3_get_method(int ver);
-#else
-static SSL_METHOD *ssl3_get_method();
-#endif
-
-static SSL_METHOD *ssl3_get_method(int ver)
+static const SSL_METHOD *ssl3_get_method(int ver);
+static const SSL_METHOD *ssl3_get_method(int ver)
        {
        if (ver == SSL3_VERSION)
                return(SSLv3_method());
@@ -74,20 +69,9 @@ static SSL_METHOD *ssl3_get_method(int ver)
                return(NULL);
        }
 
-SSL_METHOD *SSLv3_method(void)
-       {
-       static int init=1;
-       static SSL_METHOD SSLv3_data;
+IMPLEMENT_ssl3_meth_func(SSLv3_method,
+                        ssl3_accept,
+                        ssl3_connect,
+                        ssl3_get_method)
 
-       if (init)
-               {
-               memcpy((char *)&SSLv3_data,(char *)sslv3_base_method(),
-                       sizeof(SSL_METHOD));
-               SSLv3_data.ssl_connect=ssl3_connect;
-               SSLv3_data.ssl_accept=ssl3_accept;
-               SSLv3_data.get_ssl_method=ssl3_get_method;
-               init=0;
-               }
-       return(&SSLv3_data);
-       }