diff options
author | kris <kris@FreeBSD.org> | 2001-05-20 03:17:35 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2001-05-20 03:17:35 +0000 |
commit | 445c7928a166ddd374f98189e149d7e27092573e (patch) | |
tree | 4127aa35b669d1fef973314beb69f8303022eb16 /crypto/openssl/ssl/s23_lib.c | |
parent | 8acf08a7904cd7fbf506f79a905bb8e29164019a (diff) | |
download | FreeBSD-src-445c7928a166ddd374f98189e149d7e27092573e.zip FreeBSD-src-445c7928a166ddd374f98189e149d7e27092573e.tar.gz |
Resolve conflicts
Diffstat (limited to 'crypto/openssl/ssl/s23_lib.c')
-rw-r--r-- | crypto/openssl/ssl/s23_lib.c | 38 |
1 files changed, 24 insertions, 14 deletions
diff --git a/crypto/openssl/ssl/s23_lib.c b/crypto/openssl/ssl/s23_lib.c index bc77e84..fe7e2d1 100644 --- a/crypto/openssl/ssl/s23_lib.c +++ b/crypto/openssl/ssl/s23_lib.c @@ -65,6 +65,7 @@ static int ssl23_num_ciphers(void ); static SSL_CIPHER *ssl23_get_cipher(unsigned int u); static int ssl23_read(SSL *s, void *buf, int len); +static int ssl23_peek(SSL *s, void *buf, int len); static int ssl23_write(SSL *s, const void *buf, int len); static long ssl23_default_timeout(void ); static int ssl23_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p); @@ -79,7 +80,7 @@ static SSL_METHOD SSLv23_data= { ssl_undefined_function, ssl_undefined_function, ssl23_read, - (int (*)(struct ssl_st *, char *, int))ssl_undefined_function, + ssl23_peek, ssl23_write, ssl_undefined_function, ssl_undefined_function, @@ -171,13 +172,6 @@ static int ssl23_read(SSL *s, void *buf, int len) { int n; -#if 0 - if (s->shutdown & SSL_RECEIVED_SHUTDOWN) - { - s->rwstate=SSL_NOTHING; - return(0); - } -#endif clear_sys_error(); if (SSL_in_init(s) && (!s->in_handshake)) { @@ -197,17 +191,33 @@ static int ssl23_read(SSL *s, void *buf, int len) } } -static int ssl23_write(SSL *s, const void *buf, int len) +static int ssl23_peek(SSL *s, void *buf, int len) { int n; -#if 0 - if (s->shutdown & SSL_SENT_SHUTDOWN) + clear_sys_error(); + if (SSL_in_init(s) && (!s->in_handshake)) + { + n=s->handshake_func(s); + if (n < 0) return(n); + if (n == 0) + { + SSLerr(SSL_F_SSL23_PEEK,SSL_R_SSL_HANDSHAKE_FAILURE); + return(-1); + } + return(SSL_peek(s,buf,len)); + } + else { - s->rwstate=SSL_NOTHING; - return(0); + ssl_undefined_function(s); + return(-1); } -#endif + } + +static int ssl23_write(SSL *s, const void *buf, int len) + { + int n; + clear_sys_error(); if (SSL_in_init(s) && (!s->in_handshake)) { |