diff options
author | 2000-03-19 11:07:35 +0000 | |
---|---|---|
committer | 2000-03-19 11:07:35 +0000 | |
commit | ba5406e9b35230c537ab6fcb7b2fb173a1cea3c3 (patch) | |
tree | a7183e186150526f5c72717dac37cdabf1b43e51 /lib/libcrypto/stack | |
parent | Allow environment variables on command/config lines; markk@knigma.org (diff) | |
download | wireguard-openbsd-ba5406e9b35230c537ab6fcb7b2fb173a1cea3c3.tar.xz wireguard-openbsd-ba5406e9b35230c537ab6fcb7b2fb173a1cea3c3.zip |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to 'lib/libcrypto/stack')
-rw-r--r-- | lib/libcrypto/stack/Makefile.ssl | 3 | ||||
-rw-r--r-- | lib/libcrypto/stack/stack.c | 8 | ||||
-rw-r--r-- | lib/libcrypto/stack/stack.h | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/lib/libcrypto/stack/Makefile.ssl b/lib/libcrypto/stack/Makefile.ssl index faed4d03649..64a93b33ac0 100644 --- a/lib/libcrypto/stack/Makefile.ssl +++ b/lib/libcrypto/stack/Makefile.ssl @@ -82,4 +82,5 @@ stack.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h stack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h stack.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h -stack.o: ../../include/openssl/stack.h ../cryptlib.h +stack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h +stack.o: ../cryptlib.h diff --git a/lib/libcrypto/stack/stack.c b/lib/libcrypto/stack/stack.c index 8b967138848..58e9126339b 100644 --- a/lib/libcrypto/stack/stack.c +++ b/lib/libcrypto/stack/stack.c @@ -59,7 +59,7 @@ /* Code for stacks * Author - Eric Young v 1.0 * 1.2 eay 12-Mar-97 - Modified sk_find so that it _DOES_ return the - * lowest index for the seached item. + * lowest index for the searched item. * * 1.1 eay - Take from netdb and added to SSLeay * @@ -126,7 +126,7 @@ STACK *sk_new(int (*c)()) ret->sorted=0; return(ret); err1: - Free((char *)ret); + Free(ret); err0: return(NULL); } @@ -276,8 +276,8 @@ void sk_pop_free(STACK *st, void (*func)()) void sk_free(STACK *st) { if (st == NULL) return; - if (st->data != NULL) Free((char *)st->data); - Free((char *)st); + if (st->data != NULL) Free(st->data); + Free(st); } int sk_num(STACK *st) diff --git a/lib/libcrypto/stack/stack.h b/lib/libcrypto/stack/stack.h index 0f825cc0c4a..a615d9b4c94 100644 --- a/lib/libcrypto/stack/stack.h +++ b/lib/libcrypto/stack/stack.h @@ -76,8 +76,8 @@ typedef struct stack_st #define sk_new_null() sk_new(NULL) -#define M_sk_num(sk) ((sk)->num) -#define M_sk_value(sk,n) ((sk)->data[n]) +#define M_sk_num(sk) ((sk) ? (sk)->num:-1) +#define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL) int sk_num(STACK *); char *sk_value(STACK *, int); |