summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/stack
diff options
context:
space:
mode:
authorbeck <>2000-03-19 11:13:58 +0000
committerbeck <>2000-03-19 11:13:58 +0000
commit796d609550df3a33fc11468741c5d2f6d3df4c11 (patch)
tree6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/stack
parent5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff)
downloadopenbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz
openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2
openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.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 'src/lib/libcrypto/stack')
-rw-r--r--src/lib/libcrypto/stack/Makefile.ssl3
-rw-r--r--src/lib/libcrypto/stack/stack.c8
-rw-r--r--src/lib/libcrypto/stack/stack.h4
3 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/libcrypto/stack/Makefile.ssl b/src/lib/libcrypto/stack/Makefile.ssl
index faed4d0364..64a93b33ac 100644
--- a/src/lib/libcrypto/stack/Makefile.ssl
+++ b/src/lib/libcrypto/stack/Makefile.ssl
@@ -82,4 +82,5 @@ stack.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h
82stack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h 82stack.o: ../../include/openssl/crypto.h ../../include/openssl/e_os.h
83stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 83stack.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
84stack.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 84stack.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
85stack.o: ../../include/openssl/stack.h ../cryptlib.h 85stack.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
86stack.o: ../cryptlib.h
diff --git a/src/lib/libcrypto/stack/stack.c b/src/lib/libcrypto/stack/stack.c
index 8b96713884..58e9126339 100644
--- a/src/lib/libcrypto/stack/stack.c
+++ b/src/lib/libcrypto/stack/stack.c
@@ -59,7 +59,7 @@
59/* Code for stacks 59/* Code for stacks
60 * Author - Eric Young v 1.0 60 * Author - Eric Young v 1.0
61 * 1.2 eay 12-Mar-97 - Modified sk_find so that it _DOES_ return the 61 * 1.2 eay 12-Mar-97 - Modified sk_find so that it _DOES_ return the
62 * lowest index for the seached item. 62 * lowest index for the searched item.
63 * 63 *
64 * 1.1 eay - Take from netdb and added to SSLeay 64 * 1.1 eay - Take from netdb and added to SSLeay
65 * 65 *
@@ -126,7 +126,7 @@ STACK *sk_new(int (*c)())
126 ret->sorted=0; 126 ret->sorted=0;
127 return(ret); 127 return(ret);
128err1: 128err1:
129 Free((char *)ret); 129 Free(ret);
130err0: 130err0:
131 return(NULL); 131 return(NULL);
132 } 132 }
@@ -276,8 +276,8 @@ void sk_pop_free(STACK *st, void (*func)())
276void sk_free(STACK *st) 276void sk_free(STACK *st)
277 { 277 {
278 if (st == NULL) return; 278 if (st == NULL) return;
279 if (st->data != NULL) Free((char *)st->data); 279 if (st->data != NULL) Free(st->data);
280 Free((char *)st); 280 Free(st);
281 } 281 }
282 282
283int sk_num(STACK *st) 283int sk_num(STACK *st)
diff --git a/src/lib/libcrypto/stack/stack.h b/src/lib/libcrypto/stack/stack.h
index 0f825cc0c4..a615d9b4c9 100644
--- a/src/lib/libcrypto/stack/stack.h
+++ b/src/lib/libcrypto/stack/stack.h
@@ -76,8 +76,8 @@ typedef struct stack_st
76 76
77#define sk_new_null() sk_new(NULL) 77#define sk_new_null() sk_new(NULL)
78 78
79#define M_sk_num(sk) ((sk)->num) 79#define M_sk_num(sk) ((sk) ? (sk)->num:-1)
80#define M_sk_value(sk,n) ((sk)->data[n]) 80#define M_sk_value(sk,n) ((sk) ? (sk)->data[n] : NULL)
81 81
82int sk_num(STACK *); 82int sk_num(STACK *);
83char *sk_value(STACK *, int); 83char *sk_value(STACK *, int);