提交 1aad3392 编写于 作者: B Bodo Möller

Fix for BIO pairs.

上级 ba9f2808
...@@ -512,6 +512,14 @@ int BIO_fd_non_fatal_error(int error); ...@@ -512,6 +512,14 @@ int BIO_fd_non_fatal_error(int error);
int BIO_dump(BIO *b,const char *bytes,int len); int BIO_dump(BIO *b,const char *bytes,int len);
struct hostent *BIO_gethostbyname(const char *name); struct hostent *BIO_gethostbyname(const char *name);
/* We might want a thread-safe interface too:
* struct hostent *BIO_gethostbyname_r(const char *name,
* struct hostent *result, void *buffer, size_t buflen);
* or something similar (caller allocates a struct hostent,
* pointed to by "result", and additional buffer space for the various
* substructures; if the buffer does not suffice, NULL is returned
* and an appropriate error code is set).
*/
int BIO_sock_error(int sock); int BIO_sock_error(int sock);
int BIO_socket_ioctl(int fd, long type, unsigned long *arg); int BIO_socket_ioctl(int fd, long type, unsigned long *arg);
int BIO_socket_nbio(int fd,int mode); int BIO_socket_nbio(int fd,int mode);
......
...@@ -198,7 +198,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2) ...@@ -198,7 +198,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2)
return 0; return 0;
} }
if (b1->buf != NULL) if (b1->buf == NULL)
{ {
b1->buf = Malloc(b1->size); b1->buf = Malloc(b1->size);
if (b1->buf == NULL) if (b1->buf == NULL)
...@@ -210,7 +210,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2) ...@@ -210,7 +210,7 @@ static int bio_make_pair(BIO *bio1, BIO *bio2)
b1->offset = 0; b1->offset = 0;
} }
if (b2->buf != NULL) if (b2->buf == NULL)
{ {
b2->buf = Malloc(b2->size); b2->buf = Malloc(b2->size);
if (b2->buf == NULL) if (b2->buf == NULL)
......
...@@ -1765,3 +1765,5 @@ PKCS5_PBE_keyivgen 1789 ...@@ -1765,3 +1765,5 @@ PKCS5_PBE_keyivgen 1789
i2d_PKCS8_bio 1790 i2d_PKCS8_bio 1790
i2d_PKCS8_PRIV_KEY_INFO_fp 1791 i2d_PKCS8_PRIV_KEY_INFO_fp 1791
i2d_PKCS8_PRIV_KEY_INFO_bio 1792 i2d_PKCS8_PRIV_KEY_INFO_bio 1792
BIO_s_bio 1793
PKCS5_pbe2_set 1794
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册