OLD | NEW |
1 /* ssl/s23_meth.c */ | 1 /* ssl/s23_meth.c */ |
2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * This package is an SSL implementation written | 5 * This package is an SSL implementation written |
6 * by Eric Young (eay@cryptsoft.com). | 6 * by Eric Young (eay@cryptsoft.com). |
7 * The implementation was written so as to conform with Netscapes SSL. | 7 * The implementation was written so as to conform with Netscapes SSL. |
8 * | 8 * |
9 * This library is free for commercial and non-commercial use as long as | 9 * This library is free for commercial and non-commercial use as long as |
10 * the following conditions are aheared to. The following conditions | 10 * the following conditions are aheared to. The following conditions |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 * The licence and distribution terms for any publically available version or | 53 * The licence and distribution terms for any publically available version or |
54 * derivative of this code cannot be changed. i.e. this code cannot simply be | 54 * derivative of this code cannot be changed. i.e. this code cannot simply be |
55 * copied and put under another distribution licence | 55 * copied and put under another distribution licence |
56 * [including the GNU Public Licence.] | 56 * [including the GNU Public Licence.] |
57 */ | 57 */ |
58 | 58 |
59 #include <stdio.h> | 59 #include <stdio.h> |
60 #include <openssl/objects.h> | 60 #include <openssl/objects.h> |
61 #include "ssl_locl.h" | 61 #include "ssl_locl.h" |
62 | 62 |
63 static SSL_METHOD *ssl23_get_method(int ver); | 63 static const SSL_METHOD *ssl23_get_method(int ver); |
64 static SSL_METHOD *ssl23_get_method(int ver) | 64 static const SSL_METHOD *ssl23_get_method(int ver) |
65 { | 65 { |
66 #ifndef OPENSSL_NO_SSL2 | 66 #ifndef OPENSSL_NO_SSL2 |
67 if (ver == SSL2_VERSION) | 67 if (ver == SSL2_VERSION) |
68 return(SSLv2_method()); | 68 return(SSLv2_method()); |
69 else | 69 else |
70 #endif | 70 #endif |
71 #ifndef OPENSSL_NO_SSL3 | 71 #ifndef OPENSSL_NO_SSL3 |
72 if (ver == SSL3_VERSION) | 72 if (ver == SSL3_VERSION) |
73 return(SSLv3_method()); | 73 return(SSLv3_method()); |
74 else | 74 else |
75 #endif | 75 #endif |
76 #ifndef OPENSSL_NO_TLS1 | 76 #ifndef OPENSSL_NO_TLS1 |
77 if (ver == TLS1_VERSION) | 77 if (ver == TLS1_VERSION) |
78 return(TLSv1_method()); | 78 return(TLSv1_method()); |
79 else | 79 else |
80 #endif | 80 #endif |
81 return(NULL); | 81 return(NULL); |
82 } | 82 } |
83 | 83 |
84 IMPLEMENT_ssl23_meth_func(SSLv23_method, | 84 IMPLEMENT_ssl23_meth_func(SSLv23_method, |
85 ssl23_accept, | 85 ssl23_accept, |
86 ssl23_connect, | 86 ssl23_connect, |
87 ssl23_get_method) | 87 ssl23_get_method) |
88 | 88 |
OLD | NEW |