summaryrefslogtreecommitdiff
path: root/src/lib/libssl/s23_lib.c
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:17:54 +0000
committerdjm <>2008-09-06 12:17:54 +0000
commit38ce604e3cc97706b876b0525ddff0121115456d (patch)
tree7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libssl/s23_lib.c
parent12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff)
downloadopenbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2
openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip
resolve conflicts
Diffstat (limited to 'src/lib/libssl/s23_lib.c')
-rw-r--r--src/lib/libssl/s23_lib.c62
1 files changed, 12 insertions, 50 deletions
diff --git a/src/lib/libssl/s23_lib.c b/src/lib/libssl/s23_lib.c
index 8d7dbcf569..fc2981308d 100644
--- a/src/lib/libssl/s23_lib.c
+++ b/src/lib/libssl/s23_lib.c
@@ -60,55 +60,17 @@
60#include <openssl/objects.h> 60#include <openssl/objects.h>
61#include "ssl_locl.h" 61#include "ssl_locl.h"
62 62
63static int ssl23_num_ciphers(void ); 63long ssl23_default_timeout(void)
64static SSL_CIPHER *ssl23_get_cipher(unsigned int u);
65static int ssl23_read(SSL *s, void *buf, int len);
66static int ssl23_peek(SSL *s, void *buf, int len);
67static int ssl23_write(SSL *s, const void *buf, int len);
68static long ssl23_default_timeout(void );
69static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p);
70static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p);
71const char *SSL23_version_str="SSLv2/3 compatibility" OPENSSL_VERSION_PTEXT;
72
73static 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
101static long ssl23_default_timeout(void)
102 { 64 {
103 return(300); 65 return(300);
104 } 66 }
105 67
106SSL_METHOD *sslv23_base_method(void) 68IMPLEMENT_ssl23_meth_func(sslv23_base_method,
107 { 69 ssl_undefined_function,
108 return(&SSLv23_data); 70 ssl_undefined_function,
109 } 71 ssl_bad_method)
110 72
111static int ssl23_num_ciphers(void) 73int ssl23_num_ciphers(void)
112 { 74 {
113 return(ssl3_num_ciphers() 75 return(ssl3_num_ciphers()
114#ifndef OPENSSL_NO_SSL2 76#ifndef OPENSSL_NO_SSL2
@@ -117,7 +79,7 @@ static int ssl23_num_ciphers(void)
117 ); 79 );
118 } 80 }
119 81
120static SSL_CIPHER *ssl23_get_cipher(unsigned int u) 82SSL_CIPHER *ssl23_get_cipher(unsigned int u)
121 { 83 {
122 unsigned int uu=ssl3_num_ciphers(); 84 unsigned int uu=ssl3_num_ciphers();
123 85
@@ -133,7 +95,7 @@ static SSL_CIPHER *ssl23_get_cipher(unsigned int u)
133 95
134/* This function needs to check if the ciphers required are actually 96/* This function needs to check if the ciphers required are actually
135 * available */ 97 * available */
136static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p) 98SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
137 { 99 {
138 SSL_CIPHER c,*cp; 100 SSL_CIPHER c,*cp;
139 unsigned long id; 101 unsigned long id;
@@ -151,7 +113,7 @@ static SSL_CIPHER *ssl23_get_cipher_by_char(const unsigned char *p)
151 return(cp); 113 return(cp);
152 } 114 }
153 115
154static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) 116int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
155 { 117 {
156 long l; 118 long l;
157 119
@@ -166,7 +128,7 @@ static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p)
166 return(3); 128 return(3);
167 } 129 }
168 130
169static int ssl23_read(SSL *s, void *buf, int len) 131int ssl23_read(SSL *s, void *buf, int len)
170 { 132 {
171 int n; 133 int n;
172 134
@@ -189,7 +151,7 @@ static int ssl23_read(SSL *s, void *buf, int len)
189 } 151 }
190 } 152 }
191 153
192static int ssl23_peek(SSL *s, void *buf, int len) 154int ssl23_peek(SSL *s, void *buf, int len)
193 { 155 {
194 int n; 156 int n;
195 157
@@ -212,7 +174,7 @@ static int ssl23_peek(SSL *s, void *buf, int len)
212 } 174 }
213 } 175 }
214 176
215static int ssl23_write(SSL *s, const void *buf, int len) 177int ssl23_write(SSL *s, const void *buf, int len)
216 { 178 {
217 int n; 179 int n;
218 180