summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bss_null.c
diff options
context:
space:
mode:
authorbeck <>1999-09-29 04:37:45 +0000
committerbeck <>1999-09-29 04:37:45 +0000
commitde8f24ea083384bb66b32ec105dc4743c5663cdf (patch)
tree1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bio/bss_null.c
parentcb929d29896bcb87c2a97417fbd03e50078fc178 (diff)
downloadopenbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.gz
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.tar.bz2
openbsd-de8f24ea083384bb66b32ec105dc4743c5663cdf.zip
OpenSSL 0.9.4 merge
Diffstat (limited to 'src/lib/libcrypto/bio/bss_null.c')
-rw-r--r--src/lib/libcrypto/bio/bss_null.c46
1 files changed, 9 insertions, 37 deletions
diff --git a/src/lib/libcrypto/bio/bss_null.c b/src/lib/libcrypto/bio/bss_null.c
index 0791a2471a..d04be888e5 100644
--- a/src/lib/libcrypto/bio/bss_null.c
+++ b/src/lib/libcrypto/bio/bss_null.c
@@ -59,9 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include <errno.h> 60#include <errno.h>
61#include "cryptlib.h" 61#include "cryptlib.h"
62#include "bio.h" 62#include <openssl/bio.h>
63 63
64#ifndef NOPROTO
65static int null_write(BIO *h,char *buf,int num); 64static int null_write(BIO *h,char *buf,int num);
66static int null_read(BIO *h,char *buf,int size); 65static int null_read(BIO *h,char *buf,int size);
67static int null_puts(BIO *h,char *str); 66static int null_puts(BIO *h,char *str);
@@ -69,16 +68,6 @@ static int null_gets(BIO *h,char *str,int size);
69static long null_ctrl(BIO *h,int cmd,long arg1,char *arg2); 68static long null_ctrl(BIO *h,int cmd,long arg1,char *arg2);
70static int null_new(BIO *h); 69static int null_new(BIO *h);
71static int null_free(BIO *data); 70static int null_free(BIO *data);
72#else
73static int null_write();
74static int null_read();
75static int null_puts();
76static int null_gets();
77static long null_ctrl();
78static int null_new();
79static int null_free();
80#endif
81
82static BIO_METHOD null_method= 71static BIO_METHOD null_method=
83 { 72 {
84 BIO_TYPE_NULL, 73 BIO_TYPE_NULL,
@@ -92,13 +81,12 @@ static BIO_METHOD null_method=
92 null_free, 81 null_free,
93 }; 82 };
94 83
95BIO_METHOD *BIO_s_null() 84BIO_METHOD *BIO_s_null(void)
96 { 85 {
97 return(&null_method); 86 return(&null_method);
98 } 87 }
99 88
100static int null_new(bi) 89static int null_new(BIO *bi)
101BIO *bi;
102 { 90 {
103 bi->init=1; 91 bi->init=1;
104 bi->num=0; 92 bi->num=0;
@@ -106,34 +94,23 @@ BIO *bi;
106 return(1); 94 return(1);
107 } 95 }
108 96
109static int null_free(a) 97static int null_free(BIO *a)
110BIO *a;
111 { 98 {
112 if (a == NULL) return(0); 99 if (a == NULL) return(0);
113 return(1); 100 return(1);
114 } 101 }
115 102
116static int null_read(b,out,outl) 103static int null_read(BIO *b, char *out, int outl)
117BIO *b;
118char *out;
119int outl;
120 { 104 {
121 return(0); 105 return(0);
122 } 106 }
123 107
124static int null_write(b,in,inl) 108static int null_write(BIO *b, char *in, int inl)
125BIO *b;
126char *in;
127int inl;
128 { 109 {
129 return(inl); 110 return(inl);
130 } 111 }
131 112
132static long null_ctrl(b,cmd,num,ptr) 113static long null_ctrl(BIO *b, int cmd, long num, char *ptr)
133BIO *b;
134int cmd;
135long num;
136char *ptr;
137 { 114 {
138 long ret=1; 115 long ret=1;
139 116
@@ -159,17 +136,12 @@ char *ptr;
159 return(ret); 136 return(ret);
160 } 137 }
161 138
162static int null_gets(bp,buf,size) 139static int null_gets(BIO *bp, char *buf, int size)
163BIO *bp;
164char *buf;
165int size;
166 { 140 {
167 return(0); 141 return(0);
168 } 142 }
169 143
170static int null_puts(bp,str) 144static int null_puts(BIO *bp, char *str)
171BIO *bp;
172char *str;
173 { 145 {
174 if (str == NULL) return(0); 146 if (str == NULL) return(0);
175 return(strlen(str)); 147 return(strlen(str));