OpenSSL 1.1.1-pre2

This commit is contained in:
Hakase
2018-04-07 17:29:40 +09:00
parent 82a44d2483
commit bbac8ca55d
17755 changed files with 221242 additions and 98415 deletions
+19 -15
View File
@@ -25,7 +25,11 @@ static long nullf_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp);
static const BIO_METHOD methods_nullf = {
BIO_TYPE_NULL_FILTER,
"NULL filter",
/* TODO: Convert to new style write function */
bwrite_conv,
nullf_write,
/* TODO: Convert to new style read function */
bread_conv,
nullf_read,
nullf_puts,
nullf_gets,
@@ -37,7 +41,7 @@ static const BIO_METHOD methods_nullf = {
const BIO_METHOD *BIO_f_null(void)
{
return (&methods_nullf);
return &methods_nullf;
}
static int nullf_read(BIO *b, char *out, int outl)
@@ -45,13 +49,13 @@ static int nullf_read(BIO *b, char *out, int outl)
int ret = 0;
if (out == NULL)
return (0);
return 0;
if (b->next_bio == NULL)
return (0);
return 0;
ret = BIO_read(b->next_bio, out, outl);
BIO_clear_retry_flags(b);
BIO_copy_next_retry(b);
return (ret);
return ret;
}
static int nullf_write(BIO *b, const char *in, int inl)
@@ -59,13 +63,13 @@ static int nullf_write(BIO *b, const char *in, int inl)
int ret = 0;
if ((in == NULL) || (inl <= 0))
return (0);
return 0;
if (b->next_bio == NULL)
return (0);
return 0;
ret = BIO_write(b->next_bio, in, inl);
BIO_clear_retry_flags(b);
BIO_copy_next_retry(b);
return (ret);
return ret;
}
static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr)
@@ -73,7 +77,7 @@ static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr)
long ret;
if (b->next_bio == NULL)
return (0);
return 0;
switch (cmd) {
case BIO_C_DO_STATE_MACHINE:
BIO_clear_retry_flags(b);
@@ -86,7 +90,7 @@ static long nullf_ctrl(BIO *b, int cmd, long num, void *ptr)
default:
ret = BIO_ctrl(b->next_bio, cmd, num, ptr);
}
return (ret);
return ret;
}
static long nullf_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
@@ -94,25 +98,25 @@ static long nullf_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp)
long ret = 1;
if (b->next_bio == NULL)
return (0);
return 0;
switch (cmd) {
default:
ret = BIO_callback_ctrl(b->next_bio, cmd, fp);
break;
}
return (ret);
return ret;
}
static int nullf_gets(BIO *bp, char *buf, int size)
{
if (bp->next_bio == NULL)
return (0);
return (BIO_gets(bp->next_bio, buf, size));
return 0;
return BIO_gets(bp->next_bio, buf, size);
}
static int nullf_puts(BIO *bp, const char *str)
{
if (bp->next_bio == NULL)
return (0);
return (BIO_puts(bp->next_bio, str));
return 0;
return BIO_puts(bp->next_bio, str);
}