summaryrefslogtreecommitdiff
path: root/lib/libcrypto/asn1
AgeCommit message (Collapse)Author
2015-07-29Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generatedJoel Sing
assembly. ok bcook@
2015-07-29Expand obsolete M_ASN1_STRING_* macros in asn1_lib.c, apply some style(9)Joel Sing
and drop an unnecessary return from a void function. ok bcook@ doug@
2015-07-27Less asn1_mac.h - asn1_lib.c does not need it and x_pkey.c should beJoel Sing
using ASN1err() instead of ASN1_MAC_H_err(). ok miod@
2015-07-25Place the ASN.1 template macros (and remaining implement macros) underJoel Sing
#ifndef LIBRESSL_INTERNAL - we're not using these anymore!
2015-07-25Manually expand ASN.1 template macros - only change in generated assemblyJoel Sing
is due to line numbering.
2015-07-24Expand ASN1_ITEM_TEMPLATE/ASN1_EX_TEMPLATE_TYPE/ASN1_ITEM_TEMPLATE_ENDJoel Sing
macros - the generated assembly only differs by changes to line numbers.
2015-07-24Expand IMPLEMENT_ASN1_MSTRING macros - the generated assembly only differsJoel Sing
by changes to line numbers.
2015-07-20Use V_ASN1_UNDEF instead of -1.Miod Vallat
Make sure ASN1_primitive_new() will return NULL in *pval in all error situations. ok bcook@ doug@
2015-07-20Check the return value of asn1_enc_save(). ok bcook@ doug@Miod Vallat
2015-07-20When freeing an X509_CRL, if freeing the user-maintained meth_data fails,Miod Vallat
do not forgot to nevertheless keep freeing the other fields. ok doug@ guenther@
2015-07-20In X509_PKEY_new(), make sure all allocation failures push an error to theMiod Vallat
error stack, not only the first one. ok guenther@ doug@
2015-07-19Drop stupid (int) casts for the arguments of malloc() and friends. This isMiod Vallat
not 16-bit MS-DOS anymore. ok bcook@ tedu@
2015-07-18Check the return value of ASN1_STRING_set(), for it may fail to allocateMiod Vallat
memory. Coverity CID 24810, 24846. ok bcook@ doug@
2015-07-16Enforce V_ASN1_OCTET_STRING type before accessing the object as octet string;Miod Vallat
from OpenSSL (RT #3683) ok doug@ jsing@
2015-07-16Explicitely cast a char into unsigned long before shifting it left by 24, forMiod Vallat
this would promote it to int for the shift, and then cast to unsigned long, sign-extending it if sizeof(long) > sizeof(int). This was not a problem because the computed value was explicitely range checked afterwards, with an upper bound way smaller than 1U<<31, but it's better practice to cast correctly. ok beck@
2015-07-15Fix two theoretical NULL pointer dereferences which can only happen if youMiod Vallat
have seriously corrupted your memory; Coverity CID 21708 and 21721. While there, plug a memory leak upon error in x509_name_canon(). ok bcook@ beck@
2015-04-12Remove d2i_X509_PKEY and i2d_X509_PKEY from the SSLeay days.Doug Hogan
i2d_X509_PKEY is a "needs to implement" and d2i_X509_PKEY is broken. Removed upstream in commit b1f3442857c1fd76e91941141bf671d19e90a79d. ok deraadt@, jsing@
2015-03-19Fix several crash causing defects from OpenSSL.Ted Unangst
These include: CVE-2015-0209 - Use After Free following d2i_ECPrivatekey error CVE-2015-0286 - Segmentation fault in ASN1_TYPE_cmp CVE-2015-0287 - ASN.1 structure reuse memory corruption CVE-2015-0289 - PKCS7 NULL pointer dereferences Several other issues did not apply or were already fixed. Refer to https://www.openssl.org/news/secadv_20150319.txt joint work with beck, doug, guenther, jsing, miod
2015-02-22Remove IMPLEMENT_STACK_OF noops.Joel Sing
2015-02-15RegenMiod Vallat
2015-02-14Remove asn1_ex_i2c() prototype, now that this function has been made static;Miod Vallat
reminded by bcook@
2015-02-14Unchecked allocations in x509_name_canon().Miod Vallat
ok doug@ jsing@
2015-02-14Memory leak upon error in X509_add1_{trust,reject}_object.Miod Vallat
ok doug@
2015-02-14Manually expand IMPLEMENT_EXTERN_ASN1 macro (the only occurence in crypto).Joel Sing
Only change to generated assembly is due to line numbers.
2015-02-14Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it inMiod Vallat
libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded copies of OpenSSL. ok jsing@
2015-02-14Make asn1_ex_i2c() static. ok jsing@Miod Vallat
2015-02-14Check i2d_name_canon() for failure (negative return). Coverity CID 78888.Miod Vallat
ok doug@ jsing@
2015-02-14Possible NULL pointer dereferences. Coverity CID 21719, 21732.Miod Vallat
ok doug@ jsing@
2015-02-14Expand ASN1_CHOICE*, ASN1_SEQUENCE* and associated macros, making theJoel Sing
data structures visible and easier to review, without having to wade through layers and layers of asn1t.h macros. Change has been scripted and there is no change to the generated assembly. Discussed with beck@ miod@ tedu@
2015-02-14Spell NULL correctly, be explicit with NULL checks and it is also easier toJoel Sing
initialise during declaration and drop the else statement. ok doug@ miod@
2015-02-12prevent a crash with openssl asn1parse -genstr FORMATJonathan Gray
aka ASN1_generate_nconf("FORMAT", NULL) ok krw@ beck@ jsing@
2015-02-11Remove initialisers with default values from the ASN1 data structures.Joel Sing
Minor changes in generated assembly due to the compiler swapping from .quad 0/.long 0 to .zero, along with changes due to line numbering.
2015-02-11Expand most of the ASN1_SEQUENCE* and associated macros, making the dataJoel Sing
structures visible and easier to review, without having to wade through layers and layers of asn1t.h macros. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-11Enable building with -DOPENSSL_NO_DEPRECATED.Doug Hogan
If you didn't enable deprecated code, there were missing err.h and bn.h includes. This commit allows building with or without deprecated code. This was not derived from an OpenSSL commit. However, they recently enabled OPENSSL_NO_DEPRECATED in git and fixed these header problems in a different way. Verified with clang that this only changes line numbers in the generated asm. ok miod@
2015-02-10unifdef OPENSSL_NO_RFC3779 - this is currently disabled and unlikely toJoel Sing
be enabled, mostly since people use SANs instead. ok beck@ guenther@
2015-02-10Remove more IMPLEMENT_STACK_OF noops that have been hiding for the lastJoel Sing
15 years.
2015-02-10Replace assert() and OPENSSL_assert() calls with proper error return paths.Miod Vallat
Careful review, feedback & ok doug@ jsing@
2015-02-10Remove default value initialisers for ASN1_ITEM. Minor changes to generatedJoel Sing
assembly due to switches between .quad and .zero for structs.
2015-02-10Expand IMPLEMENT_ASN1_TYPE macros - no change to generated assembly.Joel Sing
2015-02-10The IMPLEMENT_STACK_OF and IMPLEMENT_ASN1_SET_OF macros were turned intoJoel Sing
noops around 15 years ago. Remove multiple occurances of both that still exist in the code today.
2015-02-10Place the IMPLEMENT_ASN1_.*FUNCTION.* macros under an #ifndefJoel Sing
LIBRESSL_INTERNAL - we do not need them any more.
2015-02-10Expand IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname macros that got missed.Joel Sing
2015-02-10Manually expand ASN1_ITEM_rptr macros that should have been expanded withJoel Sing
the IMPLEMENT_ASN1_DUP_FUNCTION macro.
2015-02-10Expand the -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_(const_)?fname macros so thatJoel Sing
the code is visible and functions can be readily located. Change has been scripted and there is no change to the generated assembly. Discussed with beck@ miod@ tedu@
2015-02-10Expand the IMPLEMENT_ASN1_DUP_FUNCTION macro so that the code is visibleJoel Sing
and functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-10Expand the IMPLEMENT_ASN1_FUNCTIONS_{const,fname,name} macros so that theJoel Sing
code is visible and functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-09Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible andJoel Sing
functions can be readily located. Change has been scripted and the generated assembly only differs by changes to line numbers. Discussed with beck@ miod@ tedu@
2015-02-08Check memory allocation results, as well as stack pushes.Miod Vallat
Also fix a memory leak in one of the error paths of SMIME_read_ASN1(), spotted by doug@ tweaks&ok doug@ jsing@
2015-02-07Don't leak addresses in error messages.Miod Vallat
2015-02-07Delete a lot of #if 0 code in libressl.Doug Hogan
There are a few instances where #if 1 is removed but the code remains. Based on the following OpenSSL commits. Some of the commits weren't strictly deletions so they are going to be split up into separate commits. 6f91b017bbb7140f816721141ac156d1b828a6b3 3d47c1d331fdc7574d2275cda1a630ccdb624b08 dfb56425b68314b2b57e17c82c1df42e7a015132 c8fa2356a00cbaada8963f739e5570298311a060 f16a64d11f55c01f56baa62ebf1dec7f8fe718cb 9ccc00ef6ea65567622e40c49aca43f2c6d79cdb 02a938c953b3e1ced71d9a832de1618f907eb96d 75d0ebef2aef7a2c77b27575b8da898e22f3ccd5 d6fbb194095312f4722c81c9362dbd0de66cb656 6f1a93ad111c7dfe36a09a976c4c009079b19ea1 1a5adcfb5edfe23908b350f8757df405b0f5f71f 8de24b792743d11e1d5a0dcd336a49368750c577 a2b18e657ea1a932d125154f4e13ab2258796d90 8e964419603d2478dfb391c66e7ccb2dcc9776b4 32dfde107636ac9bc62a5b3233fe2a54dbc27008 input + ok jsing@, miod@, tedu@