diff options
author | beck <> | 1999-09-29 04:37:45 +0000 |
---|---|---|
committer | beck <> | 1999-09-29 04:37:45 +0000 |
commit | de8f24ea083384bb66b32ec105dc4743c5663cdf (patch) | |
tree | 1412176ae62a3cab2cf2b0b92150fcbceaac6092 /src/lib/libcrypto/bio/bss_null.c | |
parent | cb929d29896bcb87c2a97417fbd03e50078fc178 (diff) | |
download | openbsd-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.c | 46 |
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 | ||
65 | static int null_write(BIO *h,char *buf,int num); | 64 | static int null_write(BIO *h,char *buf,int num); |
66 | static int null_read(BIO *h,char *buf,int size); | 65 | static int null_read(BIO *h,char *buf,int size); |
67 | static int null_puts(BIO *h,char *str); | 66 | static int null_puts(BIO *h,char *str); |
@@ -69,16 +68,6 @@ static int null_gets(BIO *h,char *str,int size); | |||
69 | static long null_ctrl(BIO *h,int cmd,long arg1,char *arg2); | 68 | static long null_ctrl(BIO *h,int cmd,long arg1,char *arg2); |
70 | static int null_new(BIO *h); | 69 | static int null_new(BIO *h); |
71 | static int null_free(BIO *data); | 70 | static int null_free(BIO *data); |
72 | #else | ||
73 | static int null_write(); | ||
74 | static int null_read(); | ||
75 | static int null_puts(); | ||
76 | static int null_gets(); | ||
77 | static long null_ctrl(); | ||
78 | static int null_new(); | ||
79 | static int null_free(); | ||
80 | #endif | ||
81 | |||
82 | static BIO_METHOD null_method= | 71 | static 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 | ||
95 | BIO_METHOD *BIO_s_null() | 84 | BIO_METHOD *BIO_s_null(void) |
96 | { | 85 | { |
97 | return(&null_method); | 86 | return(&null_method); |
98 | } | 87 | } |
99 | 88 | ||
100 | static int null_new(bi) | 89 | static int null_new(BIO *bi) |
101 | BIO *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 | ||
109 | static int null_free(a) | 97 | static int null_free(BIO *a) |
110 | BIO *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 | ||
116 | static int null_read(b,out,outl) | 103 | static int null_read(BIO *b, char *out, int outl) |
117 | BIO *b; | ||
118 | char *out; | ||
119 | int outl; | ||
120 | { | 104 | { |
121 | return(0); | 105 | return(0); |
122 | } | 106 | } |
123 | 107 | ||
124 | static int null_write(b,in,inl) | 108 | static int null_write(BIO *b, char *in, int inl) |
125 | BIO *b; | ||
126 | char *in; | ||
127 | int inl; | ||
128 | { | 109 | { |
129 | return(inl); | 110 | return(inl); |
130 | } | 111 | } |
131 | 112 | ||
132 | static long null_ctrl(b,cmd,num,ptr) | 113 | static long null_ctrl(BIO *b, int cmd, long num, char *ptr) |
133 | BIO *b; | ||
134 | int cmd; | ||
135 | long num; | ||
136 | char *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 | ||
162 | static int null_gets(bp,buf,size) | 139 | static int null_gets(BIO *bp, char *buf, int size) |
163 | BIO *bp; | ||
164 | char *buf; | ||
165 | int size; | ||
166 | { | 140 | { |
167 | return(0); | 141 | return(0); |
168 | } | 142 | } |
169 | 143 | ||
170 | static int null_puts(bp,str) | 144 | static int null_puts(BIO *bp, char *str) |
171 | BIO *bp; | ||
172 | char *str; | ||
173 | { | 145 | { |
174 | if (str == NULL) return(0); | 146 | if (str == NULL) return(0); |
175 | return(strlen(str)); | 147 | return(strlen(str)); |