summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bio/bf_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bio/bf_null.c')
-rw-r--r--src/lib/libcrypto/bio/bf_null.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/lib/libcrypto/bio/bf_null.c b/src/lib/libcrypto/bio/bf_null.c
index 3254a55dce..0d183a6d9a 100644
--- a/src/lib/libcrypto/bio/bf_null.c
+++ b/src/lib/libcrypto/bio/bf_null.c
@@ -72,6 +72,7 @@ static int nullf_gets(BIO *h,char *str,int size);
72static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2); 72static long nullf_ctrl(BIO *h,int cmd,long arg1,char *arg2);
73static int nullf_new(BIO *h); 73static int nullf_new(BIO *h);
74static int nullf_free(BIO *data); 74static int nullf_free(BIO *data);
75static long nullf_callback_ctrl(BIO *h,int cmd,void (*fp)());
75static BIO_METHOD methods_nullf= 76static BIO_METHOD methods_nullf=
76 { 77 {
77 BIO_TYPE_NULL_FILTER, 78 BIO_TYPE_NULL_FILTER,
@@ -83,6 +84,7 @@ static BIO_METHOD methods_nullf=
83 nullf_ctrl, 84 nullf_ctrl,
84 nullf_new, 85 nullf_new,
85 nullf_free, 86 nullf_free,
87 nullf_callback_ctrl,
86 }; 88 };
87 89
88BIO_METHOD *BIO_f_null(void) 90BIO_METHOD *BIO_f_null(void)
@@ -152,6 +154,20 @@ static long nullf_ctrl(BIO *b, int cmd, long num, char *ptr)
152 return(ret); 154 return(ret);
153 } 155 }
154 156
157static long nullf_callback_ctrl(BIO *b, int cmd, void (*fp)())
158 {
159 long ret=1;
160
161 if (b->next_bio == NULL) return(0);
162 switch (cmd)
163 {
164 default:
165 ret=BIO_callback_ctrl(b->next_bio,cmd,fp);
166 break;
167 }
168 return(ret);
169 }
170
155static int nullf_gets(BIO *bp, char *buf, int size) 171static int nullf_gets(BIO *bp, char *buf, int size)
156 { 172 {
157 if (bp->next_bio == NULL) return(0); 173 if (bp->next_bio == NULL) return(0);