Remove references to RSAref. The glue library is but a memory to fade
[openssl.git] / ssl / bio_ssl.c
index ae99a6aceb0ab888ddba9b637feddb8abb697c6b..9141ec0d7b7756a248e3fbdcdfa6771388b78c5a 100644 (file)
@@ -71,7 +71,7 @@ static int ssl_puts(BIO *h, const char *str);
 static long ssl_ctrl(BIO *h, int cmd, long arg1, void *arg2);
 static int ssl_new(BIO *h);
 static int ssl_free(BIO *data);
-static long ssl_callback_ctrl(BIO *h, int cmd, void (*fp)());
+static long ssl_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
 typedef struct bio_ssl_st
        {
        SSL *ssl; /* The ssl handle :-) */
@@ -105,7 +105,7 @@ static int ssl_new(BIO *bi)
        {
        BIO_SSL *bs;
 
-       bs=(BIO_SSL *)Malloc(sizeof(BIO_SSL));
+       bs=(BIO_SSL *)OPENSSL_malloc(sizeof(BIO_SSL));
        if (bs == NULL)
                {
                BIOerr(BIO_F_SSL_NEW,ERR_R_MALLOC_FAILURE);
@@ -133,7 +133,7 @@ static int ssl_free(BIO *a)
                a->flags=0;
                }
        if (a->ptr != NULL)
-               Free(a->ptr);
+               OPENSSL_free(a->ptr);
        return(1);
        }
        
@@ -206,6 +206,10 @@ static int ssl_read(BIO *b, char *out, int outl)
                BIO_set_retry_special(b);
                retry_reason=BIO_RR_SSL_X509_LOOKUP;
                break;
+       case SSL_ERROR_WANT_ACCEPT:
+               BIO_set_retry_special(b);
+               retry_reason=BIO_RR_ACCEPT;
+               break;
        case SSL_ERROR_WANT_CONNECT:
                BIO_set_retry_special(b);
                retry_reason=BIO_RR_CONNECT;
@@ -470,7 +474,7 @@ static long ssl_ctrl(BIO *b, int cmd, long num, void *ptr)
        return(ret);
        }
 
-static long ssl_callback_ctrl(BIO *b, int cmd, void (*fp)())
+static long ssl_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
        {
        SSL *ssl;
        BIO_SSL *bs;