summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/stack
diff options
context:
space:
mode:
authormiod <>2014-04-18 17:32:31 +0000
committermiod <>2014-04-18 17:32:31 +0000
commit0b47fa2bab5b51d4929f5347baa45bcef8856d90 (patch)
treedba66643fe8afbf27d4baab6c8cdf4d3e896f3a1 /src/lib/libcrypto/stack
parentf6130bd40807568ae84a0351ec561620b9bcc6cd (diff)
downloadopenbsd-0b47fa2bab5b51d4929f5347baa45bcef8856d90.tar.gz
openbsd-0b47fa2bab5b51d4929f5347baa45bcef8856d90.tar.bz2
openbsd-0b47fa2bab5b51d4929f5347baa45bcef8856d90.zip
Put back i2d_ASN1_SET() and d2i_ASN1_SET() from the NO_ASN1_OLD prune, as there
are still some 3rd-party code using it, and fixing them is not trivial. As an excuse gift, the memory leaks on failure in resurrected a_set.c have been fixed.
Diffstat (limited to 'src/lib/libcrypto/stack')
-rw-r--r--src/lib/libcrypto/stack/safestack.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/libcrypto/stack/safestack.h b/src/lib/libcrypto/stack/safestack.h
index 56978a2b01..f2a36fd64b 100644
--- a/src/lib/libcrypto/stack/safestack.h
+++ b/src/lib/libcrypto/stack/safestack.h
@@ -178,6 +178,19 @@ DECLARE_SPECIAL_STACK_OF(OPENSSL_BLOCK, void)
178#define SKM_sk_is_sorted(type, st) \ 178#define SKM_sk_is_sorted(type, st) \
179 sk_is_sorted(CHECKED_STACK_OF(type, st)) 179 sk_is_sorted(CHECKED_STACK_OF(type, st))
180 180
181#define SKM_ASN1_SET_OF_d2i(type, st, pp, length, d2i_func, free_func, ex_tag, ex_class) \
182 (STACK_OF(type) *)d2i_ASN1_SET( \
183 (STACK_OF(OPENSSL_BLOCK) **)CHECKED_PTR_OF(STACK_OF(type)*, st), \
184 pp, length, \
185 CHECKED_D2I_OF(type, d2i_func), \
186 CHECKED_SK_FREE_FUNC(type, free_func), \
187 ex_tag, ex_class)
188
189#define SKM_ASN1_SET_OF_i2d(type, st, pp, i2d_func, ex_tag, ex_class, is_set) \
190 i2d_ASN1_SET((STACK_OF(OPENSSL_BLOCK) *)CHECKED_STACK_OF(type, st), pp, \
191 CHECKED_I2D_OF(type, i2d_func), \
192 ex_tag, ex_class, is_set)
193
181#define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \ 194#define SKM_PKCS12_decrypt_d2i(type, algor, d2i_func, free_func, pass, passlen, oct, seq) \
182 (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \ 195 (STACK_OF(type) *)PKCS12_decrypt_d2i(algor, \
183 CHECKED_D2I_OF(type, d2i_func), \ 196 CHECKED_D2I_OF(type, d2i_func), \