SSL_get_[rw]fd were documented but not implemented.

This commit is contained in:
Richard Levitte 2001-07-15 20:12:45 +00:00
parent 6b99c692d0
commit 026dad0f3b
2 changed files with 19 additions and 0 deletions

View file

@ -939,6 +939,8 @@ char * SSL_CIPHER_get_version(SSL_CIPHER *c);
const char * SSL_CIPHER_get_name(SSL_CIPHER *c); const char * SSL_CIPHER_get_name(SSL_CIPHER *c);
int SSL_get_fd(SSL *s); int SSL_get_fd(SSL *s);
int SSL_get_rfd(SSL *s);
int SSL_get_wfd(SSL *s);
const char * SSL_get_cipher_list(SSL *s,int n); const char * SSL_get_cipher_list(SSL *s,int n);
char * SSL_get_shared_ciphers(SSL *s, char *buf, int len); char * SSL_get_shared_ciphers(SSL *s, char *buf, int len);
int SSL_get_read_ahead(SSL * s); int SSL_get_read_ahead(SSL * s);

View file

@ -410,6 +410,11 @@ BIO *SSL_get_wbio(SSL *s)
{ return(s->wbio); } { return(s->wbio); }
int SSL_get_fd(SSL *s) int SSL_get_fd(SSL *s)
{
return(SSL_get_rfc(s));
}
int SSL_get_rfd(SSL *s)
{ {
int ret= -1; int ret= -1;
BIO *b,*r; BIO *b,*r;
@ -421,6 +426,18 @@ int SSL_get_fd(SSL *s)
return(ret); return(ret);
} }
int SSL_get_wfd(SSL *s)
{
int ret= -1;
BIO *b,*r;
b=SSL_get_wbio(s);
r=BIO_find_type(b,BIO_TYPE_DESCRIPTOR);
if (r != NULL)
BIO_get_fd(r,&ret);
return(ret);
}
#ifndef NO_SOCK #ifndef NO_SOCK
int SSL_set_fd(SSL *s,int fd) int SSL_set_fd(SSL *s,int fd)
{ {