aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bio
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2001-02-18 03:17:36 +0000
committerKris Kennaway <kris@FreeBSD.org>2001-02-18 03:17:36 +0000
commitde7cdddab120ecc07d412749bfb3f191c4e0afe3 (patch)
tree5058ee297163944bfec8dbad8c8cad174f437d82 /crypto/openssl/crypto/bio
parentddd58736f08d9acef3606719eba2e38ed611705b (diff)
downloadsrc-de7cdddab120ecc07d412749bfb3f191c4e0afe3.tar.gz
src-de7cdddab120ecc07d412749bfb3f191c4e0afe3.zip
Import of OpenSSL 0.9.6-STABLE snapshot dated 2001-02-10
Notes
Notes: svn path=/vendor-crypto/openssl/dist/; revision=72613
Diffstat (limited to 'crypto/openssl/crypto/bio')
-rw-r--r--crypto/openssl/crypto/bio/Makefile.ssl3
-rw-r--r--crypto/openssl/crypto/bio/b_sock.c14
2 files changed, 9 insertions, 8 deletions
diff --git a/crypto/openssl/crypto/bio/Makefile.ssl b/crypto/openssl/crypto/bio/Makefile.ssl
index af5998b102c4..00caa9f7eb17 100644
--- a/crypto/openssl/crypto/bio/Makefile.ssl
+++ b/crypto/openssl/crypto/bio/Makefile.ssl
@@ -49,7 +49,8 @@ all: lib
lib: $(LIBOBJ)
$(AR) $(LIB) $(LIBOBJ)
- $(RANLIB) $(LIB)
+ @echo You may get an error following this line. Please ignore.
+ - $(RANLIB) $(LIB)
@touch lib
files:
diff --git a/crypto/openssl/crypto/bio/b_sock.c b/crypto/openssl/crypto/bio/b_sock.c
index 64310058b45f..62cc3f1a0c81 100644
--- a/crypto/openssl/crypto/bio/b_sock.c
+++ b/crypto/openssl/crypto/bio/b_sock.c
@@ -113,8 +113,8 @@ int BIO_get_host_ip(const char *str, unsigned char *ip)
/* At this point, we have something that is most probably correct
in some way, so let's init the socket. */
- if (!BIO_sock_init())
- return(0); /* don't generate another error code here */
+ if (BIO_sock_init() != 1)
+ return 0; /* don't generate another error code here */
/* If the string actually contained an IP address, we need not do
anything more */
@@ -519,15 +519,15 @@ int BIO_get_accept_socket(char *host, int bind_mode)
{
int ret=0;
struct sockaddr_in server,client;
- int s= -1,cs;
+ int s=INVALID_SOCKET,cs;
unsigned char ip[4];
unsigned short port;
- char *str,*e;
+ char *str=NULL,*e;
const char *h,*p;
unsigned long l;
int err_num;
- if (!BIO_sock_init()) return(INVALID_SOCKET);
+ if (BIO_sock_init() != 1) return(INVALID_SOCKET);
if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET);
@@ -553,7 +553,7 @@ int BIO_get_accept_socket(char *host, int bind_mode)
h="*";
}
- if (!BIO_get_port(p,&port)) return(INVALID_SOCKET);
+ if (!BIO_get_port(p,&port)) goto err;
memset((char *)&server,0,sizeof(server));
server.sin_family=AF_INET;
@@ -563,7 +563,7 @@ int BIO_get_accept_socket(char *host, int bind_mode)
server.sin_addr.s_addr=INADDR_ANY;
else
{
- if (!BIO_get_host_ip(h,&(ip[0]))) return(INVALID_SOCKET);
+ if (!BIO_get_host_ip(h,&(ip[0]))) goto err;
l=(unsigned long)
((unsigned long)ip[0]<<24L)|
((unsigned long)ip[1]<<16L)|