diff options
Diffstat (limited to 'src/lib/libssl/s23_lib.c')
-rw-r--r-- | src/lib/libssl/s23_lib.c | 62 |
1 files changed, 50 insertions, 12 deletions
diff --git a/src/lib/libssl/s23_lib.c b/src/lib/libssl/s23_lib.c index fc2981308d..8d7dbcf569 100644 --- a/src/lib/libssl/s23_lib.c +++ b/src/lib/libssl/s23_lib.c | |||
@@ -60,17 +60,55 @@ | |||
60 | #include <openssl/objects.h> | 60 | #include <openssl/objects.h> |
61 | #include "ssl_locl.h" | 61 | #include "ssl_locl.h" |
62 | 62 | ||
63 | long ssl23_default_timeout(void) | 63 | static int ssl23_num_ciphers(void ); |
64 | static SSL_CIPHER *ssl23_get_cipher(unsigned int u); | ||
65 | static int ssl23_read(SSL *s, void *buf, int len); | ||
66 | static int ssl23_peek(SSL *s, void *buf, int len); | ||
67 | static int ssl23_write(SSL *s, const void *buf, int len); | ||
68 | static long ssl23_default_timeout(void ); | ||
69 | static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p); | ||
70 | static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p); | ||
71 | const char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT; | ||
72 | |||
73 | static SSL_METHOD SSLv23_data= { | ||
74 | TLS1_VERSION, | ||
75 | tls1_new, | ||
76 | tls1_clear, | ||
77 | tls1_free, | ||
78 | ssl_undefined_function, | ||
79 | ssl_undefined_function, | ||
80 | ssl23_read, | ||
81 | ssl23_peek, | ||
82 | ssl23_write, | ||
83 | ssl_undefined_function, | ||
84 | ssl_undefined_function, | ||
85 | ssl_ok, | ||
86 | ssl3_ctrl, | ||
87 | ssl3_ctx_ctrl, | ||
88 | ssl23_get_cipher_by_char, | ||
89 | ssl23_put_cipher_by_char, | ||
90 | ssl_undefined_const_function, | ||
91 | ssl23_num_ciphers, | ||
92 | ssl23_get_cipher, | ||
93 | ssl_bad_method, | ||
94 | ssl23_default_timeout, | ||
95 | &ssl3_undef_enc_method, | ||
96 | ssl_undefined_function, | ||
97 | ssl3_callback_ctrl, | ||
98 | ssl3_ctx_callback_ctrl, | ||
99 | }; | ||
100 | |||
101 | static long ssl23_default_timeout(void) | ||
64 | { | 102 | { |
65 | return(300); | 103 | return(300); |
66 | } | 104 | } |
67 | 105 | ||
68 | IMPLEMENT_ssl23_meth_func(sslv23_base_method, | 106 | SSL_METHOD *sslv23_base_method(void) |
69 | ssl_undefined_function, | 107 | { |
70 | ssl_undefined_function, | 108 | return(&SSLv23_data); |
71 | ssl_bad_method) | 109 | } |
72 | 110 | ||
73 | int ssl23_num_ciphers(void) | 111 | static int ssl23_num_ciphers(void) |
74 | { | 112 | { |
75 | return(ssl3_num_ciphers() | 113 | return(ssl3_num_ciphers() |
76 | #ifndef OPENSSL_NO_SSL2 | 114 | #ifndef OPENSSL_NO_SSL2 |
@@ -79,7 +117,7 @@ int ssl23_num_ciphers(void) | |||
79 | ); | 117 | ); |
80 | } | 118 | } |
81 | 119 | ||
82 | SSL_CIPHER *ssl23_get_cipher(unsigned int u) | 120 | static SSL_CIPHER *ssl23_get_cipher(unsigned int u) |
83 | { | 121 | { |
84 | unsigned int uu=ssl3_num_ciphers(); | 122 | unsigned int uu=ssl3_num_ciphers(); |
85 | 123 | ||
@@ -95,7 +133,7 @@ SSL_CIPHER *ssl23_get_cipher(unsigned int u) | |||
95 | 133 | ||
96 | /* This function needs to check if the ciphers required are actually | 134 | /* This function needs to check if the ciphers required are actually |
97 | * available */ | 135 | * available */ |
98 | SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) | 136 | static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) |
99 | { | 137 | { |
100 | SSL_CIPHER c,*cp; | 138 | SSL_CIPHER c,*cp; |
101 | unsigned long id; | 139 | unsigned long id; |
@@ -113,7 +151,7 @@ SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) | |||
113 | return(cp); | 151 | return(cp); |
114 | } | 152 | } |
115 | 153 | ||
116 | int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) | 154 | static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) |
117 | { | 155 | { |
118 | long l; | 156 | long l; |
119 | 157 | ||
@@ -128,7 +166,7 @@ int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) | |||
128 | return(3); | 166 | return(3); |
129 | } | 167 | } |
130 | 168 | ||
131 | int ssl23_read(SSL *s, void *buf, int len) | 169 | static int ssl23_read(SSL *s, void *buf, int len) |
132 | { | 170 | { |
133 | int n; | 171 | int n; |
134 | 172 | ||
@@ -151,7 +189,7 @@ int ssl23_read(SSL *s, void *buf, int len) | |||
151 | } | 189 | } |
152 | } | 190 | } |
153 | 191 | ||
154 | int ssl23_peek(SSL *s, void *buf, int len) | 192 | static int ssl23_peek(SSL *s, void *buf, int len) |
155 | { | 193 | { |
156 | int n; | 194 | int n; |
157 | 195 | ||
@@ -174,7 +212,7 @@ int ssl23_peek(SSL *s, void *buf, int len) | |||
174 | } | 212 | } |
175 | } | 213 | } |
176 | 214 | ||
177 | int ssl23_write(SSL *s, const void *buf, int len) | 215 | static int ssl23_write(SSL *s, const void *buf, int len) |
178 | { | 216 | { |
179 | int n; | 217 | int n; |
180 | 218 | ||