diff options
author | beck <> | 2001-06-22 00:03:44 +0000 |
---|---|---|
committer | beck <> | 2001-06-22 00:03:44 +0000 |
commit | 38b6ff9e5294811c57541ad47940f8f8f41dc114 (patch) | |
tree | 402699541cee3cf3f2943b0384dbda7de534de70 /src/lib/libcrypto/bio | |
parent | afae624d63e4e717c5bae8c7842a4712309f728f (diff) | |
download | openbsd-38b6ff9e5294811c57541ad47940f8f8f41dc114.tar.gz openbsd-38b6ff9e5294811c57541ad47940f8f8f41dc114.tar.bz2 openbsd-38b6ff9e5294811c57541ad47940f8f8f41dc114.zip |
openssl-engine-0.9.6a merge
Diffstat (limited to 'src/lib/libcrypto/bio')
-rw-r--r-- | src/lib/libcrypto/bio/Makefile.ssl | 17 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/b_print.c | 1 | ||||
-rw-r--r-- | src/lib/libcrypto/bio/b_sock.c | 14 |
3 files changed, 17 insertions, 15 deletions
diff --git a/src/lib/libcrypto/bio/Makefile.ssl b/src/lib/libcrypto/bio/Makefile.ssl index 916d651d47..567d3fb870 100644 --- a/src/lib/libcrypto/bio/Makefile.ssl +++ b/src/lib/libcrypto/bio/Makefile.ssl | |||
@@ -49,7 +49,8 @@ all: lib | |||
49 | 49 | ||
50 | lib: $(LIBOBJ) | 50 | lib: $(LIBOBJ) |
51 | $(AR) $(LIB) $(LIBOBJ) | 51 | $(AR) $(LIB) $(LIBOBJ) |
52 | $(RANLIB) $(LIB) | 52 | @echo You may get an error following this line. Please ignore. |
53 | - $(RANLIB) $(LIB) | ||
53 | @touch lib | 54 | @touch lib |
54 | 55 | ||
55 | files: | 56 | files: |
@@ -95,13 +96,13 @@ b_dump.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | |||
95 | b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 96 | b_dump.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h |
96 | b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 97 | b_dump.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
97 | b_dump.o: ../cryptlib.h | 98 | b_dump.o: ../cryptlib.h |
98 | b_print.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 99 | b_print.o: ../../include/openssl/bio.h ../../include/openssl/bn.h |
99 | b_print.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 100 | b_print.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
100 | b_print.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 101 | b_print.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h |
101 | b_print.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 102 | b_print.o: ../../include/openssl/err.h ../../include/openssl/lhash.h |
102 | b_print.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h | 103 | b_print.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
103 | b_print.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | 104 | b_print.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h |
104 | b_print.o: ../cryptlib.h | 105 | b_print.o: ../../include/openssl/symhacks.h ../cryptlib.h |
105 | b_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | 106 | b_sock.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h |
106 | b_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h | 107 | b_sock.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h |
107 | b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 108 | b_sock.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
diff --git a/src/lib/libcrypto/bio/b_print.c b/src/lib/libcrypto/bio/b_print.c index a62f551635..b4f7a85f2e 100644 --- a/src/lib/libcrypto/bio/b_print.c +++ b/src/lib/libcrypto/bio/b_print.c | |||
@@ -69,6 +69,7 @@ | |||
69 | #ifndef NO_SYS_TYPES_H | 69 | #ifndef NO_SYS_TYPES_H |
70 | #include <sys/types.h> | 70 | #include <sys/types.h> |
71 | #endif | 71 | #endif |
72 | #include <openssl/bn.h> /* To get BN_LLONG properly defined */ | ||
72 | #include <openssl/bio.h> | 73 | #include <openssl/bio.h> |
73 | 74 | ||
74 | #ifdef BN_LLONG | 75 | #ifdef BN_LLONG |
diff --git a/src/lib/libcrypto/bio/b_sock.c b/src/lib/libcrypto/bio/b_sock.c index 64310058b4..62cc3f1a0c 100644 --- a/src/lib/libcrypto/bio/b_sock.c +++ b/src/lib/libcrypto/bio/b_sock.c | |||
@@ -113,8 +113,8 @@ int BIO_get_host_ip(const char *str, unsigned char *ip) | |||
113 | 113 | ||
114 | /* At this point, we have something that is most probably correct | 114 | /* At this point, we have something that is most probably correct |
115 | in some way, so let's init the socket. */ | 115 | in some way, so let's init the socket. */ |
116 | if (!BIO_sock_init()) | 116 | if (BIO_sock_init() != 1) |
117 | return(0); /* don't generate another error code here */ | 117 | return 0; /* don't generate another error code here */ |
118 | 118 | ||
119 | /* If the string actually contained an IP address, we need not do | 119 | /* If the string actually contained an IP address, we need not do |
120 | anything more */ | 120 | anything more */ |
@@ -519,15 +519,15 @@ int BIO_get_accept_socket(char *host, int bind_mode) | |||
519 | { | 519 | { |
520 | int ret=0; | 520 | int ret=0; |
521 | struct sockaddr_in server,client; | 521 | struct sockaddr_in server,client; |
522 | int s= -1,cs; | 522 | int s=INVALID_SOCKET,cs; |
523 | unsigned char ip[4]; | 523 | unsigned char ip[4]; |
524 | unsigned short port; | 524 | unsigned short port; |
525 | char *str,*e; | 525 | char *str=NULL,*e; |
526 | const char *h,*p; | 526 | const char *h,*p; |
527 | unsigned long l; | 527 | unsigned long l; |
528 | int err_num; | 528 | int err_num; |
529 | 529 | ||
530 | if (!BIO_sock_init()) return(INVALID_SOCKET); | 530 | if (BIO_sock_init() != 1) return(INVALID_SOCKET); |
531 | 531 | ||
532 | if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET); | 532 | if ((str=BUF_strdup(host)) == NULL) return(INVALID_SOCKET); |
533 | 533 | ||
@@ -553,7 +553,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) | |||
553 | h="*"; | 553 | h="*"; |
554 | } | 554 | } |
555 | 555 | ||
556 | if (!BIO_get_port(p,&port)) return(INVALID_SOCKET); | 556 | if (!BIO_get_port(p,&port)) goto err; |
557 | 557 | ||
558 | memset((char *)&server,0,sizeof(server)); | 558 | memset((char *)&server,0,sizeof(server)); |
559 | server.sin_family=AF_INET; | 559 | server.sin_family=AF_INET; |
@@ -563,7 +563,7 @@ int BIO_get_accept_socket(char *host, int bind_mode) | |||
563 | server.sin_addr.s_addr=INADDR_ANY; | 563 | server.sin_addr.s_addr=INADDR_ANY; |
564 | else | 564 | else |
565 | { | 565 | { |
566 | if (!BIO_get_host_ip(h,&(ip[0]))) return(INVALID_SOCKET); | 566 | if (!BIO_get_host_ip(h,&(ip[0]))) goto err; |
567 | l=(unsigned long) | 567 | l=(unsigned long) |
568 | ((unsigned long)ip[0]<<24L)| | 568 | ((unsigned long)ip[0]<<24L)| |
569 | ((unsigned long)ip[1]<<16L)| | 569 | ((unsigned long)ip[1]<<16L)| |