typo
[openssl.git] / ssl / s3_meth.c
index 4762b21..cdddb17 100644 (file)
@@ -1,5 +1,5 @@
 /* ssl/s3_meth.c */
-/* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com)
+/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
  * This package is an SSL implementation written
  */
 
 #include <stdio.h>
-#include "objects.h"
+#include <openssl/objects.h>
 #include "ssl_locl.h"
 
-static SSL_METHOD *ssl3_get_method(ver)
-int ver;
+static const SSL_METHOD *ssl3_get_method(int ver);
+static const SSL_METHOD *ssl3_get_method(int ver)
        {
-       if (ver == 3)
+       if (ver == SSL3_VERSION)
                return(SSLv3_method());
-       else
+       else 
                return(NULL);
        }
 
-SSL_METHOD *SSLv3_method()
-       {
-       static int init=1;
-       static SSL_METHOD SSLv3_data;
+IMPLEMENT_ssl3_meth_func(SSLv3_method,
+                        ssl3_accept,
+                        ssl3_connect,
+                        ssl3_get_method)
 
-       if (init)
-               {
-               init=0;
-               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;
-               }
-       return(&SSLv3_data);
-       }