summaryrefslogtreecommitdiff
path: root/lib/libssl/bio_ssl.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>1999-09-29 04:37:45 +0000
committerBob Beck <beck@cvs.openbsd.org>1999-09-29 04:37:45 +0000
commitca679cff5e2a72ad205119c981e695c8cc640970 (patch)
tree691368331190f762b9f484d059ec119620396521 /lib/libssl/bio_ssl.c
parent30902ef04e4a800063b5f4afdbf1732ad34aa6b3 (diff)
OpenSSL 0.9.4 merge
Diffstat (limited to 'lib/libssl/bio_ssl.c')
-rw-r--r--lib/libssl/bio_ssl.c62
1 files changed, 16 insertions, 46 deletions
diff --git a/lib/libssl/bio_ssl.c b/lib/libssl/bio_ssl.c
index 58a6d69b9ba..f62cde4e5d5 100644
--- a/lib/libssl/bio_ssl.c
+++ b/lib/libssl/bio_ssl.c
@@ -60,27 +60,17 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
-#include "crypto.h"
-#include "bio.h"
-#include "err.h"
-#include "ssl.h"
+#include <openssl/crypto.h>
+#include <openssl/bio.h>
+#include <openssl/err.h>
+#include <openssl/ssl.h>
-#ifndef NOPROTO
static int ssl_write(BIO *h,char *buf,int num);
static int ssl_read(BIO *h,char *buf,int size);
static int ssl_puts(BIO *h,char *str);
static long ssl_ctrl(BIO *h,int cmd,long arg1,char *arg2);
static int ssl_new(BIO *h);
static int ssl_free(BIO *data);
-#else
-static int ssl_write();
-static int ssl_read();
-static int ssl_puts();
-static long ssl_ctrl();
-static int ssl_new();
-static int ssl_free();
-#endif
-
typedef struct bio_ssl_st
{
SSL *ssl; /* The ssl handle :-) */
@@ -104,13 +94,12 @@ static BIO_METHOD methods_sslp=
ssl_free,
};
-BIO_METHOD *BIO_f_ssl()
+BIO_METHOD *BIO_f_ssl(void)
{
return(&methods_sslp);
}
-static int ssl_new(bi)
-BIO *bi;
+static int ssl_new(BIO *bi)
{
BIO_SSL *bs;
@@ -127,8 +116,7 @@ BIO *bi;
return(1);
}
-static int ssl_free(a)
-BIO *a;
+static int ssl_free(BIO *a)
{
BIO_SSL *bs;
@@ -147,10 +135,7 @@ BIO *a;
return(1);
}
-static int ssl_read(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int ssl_read(BIO *b, char *out, int outl)
{
int ret=1;
BIO_SSL *sb;
@@ -234,10 +219,7 @@ int outl;
return(ret);
}
-static int ssl_write(b,out,outl)
-BIO *b;
-char *out;
-int outl;
+static int ssl_write(BIO *b, char *out, int outl)
{
int ret,r=0;
int retry_reason=0;
@@ -305,11 +287,7 @@ int outl;
return(ret);
}
-static long ssl_ctrl(b,cmd,num,ptr)
-BIO *b;
-int cmd;
-long num;
-char *ptr;
+static long ssl_ctrl(BIO *b, int cmd, long num, char *ptr)
{
SSL **sslp,*ssl;
BIO_SSL *bs;
@@ -483,9 +461,7 @@ char *ptr;
return(ret);
}
-static int ssl_puts(bp,str)
-BIO *bp;
-char *str;
+static int ssl_puts(BIO *bp, char *str)
{
int n,ret;
@@ -494,8 +470,7 @@ char *str;
return(ret);
}
-BIO *BIO_new_buffer_ssl_connect(ctx)
-SSL_CTX *ctx;
+BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx)
{
BIO *ret=NULL,*buf=NULL,*ssl=NULL;
@@ -512,8 +487,7 @@ err:
return(NULL);
}
-BIO *BIO_new_ssl_connect(ctx)
-SSL_CTX *ctx;
+BIO *BIO_new_ssl_connect(SSL_CTX *ctx)
{
BIO *ret=NULL,*con=NULL,*ssl=NULL;
@@ -530,9 +504,7 @@ err:
return(NULL);
}
-BIO *BIO_new_ssl(ctx,client)
-SSL_CTX *ctx;
-int client;
+BIO *BIO_new_ssl(SSL_CTX *ctx, int client)
{
BIO *ret;
SSL *ssl;
@@ -553,8 +525,7 @@ int client;
return(ret);
}
-int BIO_ssl_copy_session_id(t,f)
-BIO *t,*f;
+int BIO_ssl_copy_session_id(BIO *t, BIO *f)
{
t=BIO_find_type(t,BIO_TYPE_SSL);
f=BIO_find_type(f,BIO_TYPE_SSL);
@@ -567,8 +538,7 @@ BIO *t,*f;
return(1);
}
-void BIO_ssl_shutdown(b)
-BIO *b;
+void BIO_ssl_shutdown(BIO *b)
{
SSL *s;