Deleted Added
full compact
s2_meth.c (110007) s2_meth.c (160817)
1/* ssl/s2_meth.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 56 unchanged lines hidden (view full) ---

65static SSL_METHOD *ssl2_get_method(int ver)
66 {
67 if (ver == SSL2_VERSION)
68 return(SSLv2_method());
69 else
70 return(NULL);
71 }
72
1/* ssl/s2_meth.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *

--- 56 unchanged lines hidden (view full) ---

65static SSL_METHOD *ssl2_get_method(int ver)
66 {
67 if (ver == SSL2_VERSION)
68 return(SSLv2_method());
69 else
70 return(NULL);
71 }
72
73SSL_METHOD *SSLv2_method(void)
74 {
75 static int init=1;
76 static SSL_METHOD SSLv2_data;
73IMPLEMENT_ssl2_meth_func(SSLv2_method,
74 ssl2_accept,
75 ssl2_connect,
76 ssl2_get_method)
77
77
78 if (init)
79 {
80 CRYPTO_w_lock(CRYPTO_LOCK_SSL_METHOD);
81
82 if (init)
83 {
84 memcpy((char *)&SSLv2_data,(char *)sslv2_base_method(),
85 sizeof(SSL_METHOD));
86 SSLv2_data.ssl_connect=ssl2_connect;
87 SSLv2_data.ssl_accept=ssl2_accept;
88 SSLv2_data.get_ssl_method=ssl2_get_method;
89 init=0;
90 }
91
92 CRYPTO_w_unlock(CRYPTO_LOCK_SSL_METHOD);
93 }
94 return(&SSLv2_data);
95 }
96#else /* !OPENSSL_NO_SSL2 */
97
98# if PEDANTIC
99static void *dummy=&dummy;
100# endif
101
102#endif
78#else /* !OPENSSL_NO_SSL2 */
79
80# if PEDANTIC
81static void *dummy=&dummy;
82# endif
83
84#endif