summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1 (follow)
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2git to create tag 'OPENBSD_5_8_BASE'.OPENBSD_5_8_BASEcvs2svn2015-08-0281-25197/+0
|
* Expand obsolete M_ASN1.*(cmp|dup|print|set) macros - no change in generatedjsing2015-07-295-12/+12
| | | | | | assembly. ok bcook@
* Expand obsolete M_ASN1_STRING_* macros in asn1_lib.c, apply some style(9)jsing2015-07-291-6/+5
| | | | | | and drop an unnecessary return from a void function. ok bcook@ doug@
* Less asn1_mac.h - asn1_lib.c does not need it and x_pkey.c should bejsing2015-07-272-10/+5
| | | | | | using ASN1err() instead of ASN1_MAC_H_err(). ok miod@
* Place the ASN.1 template macros (and remaining implement macros) underjsing2015-07-251-3/+6
| | | | #ifndef LIBRESSL_INTERNAL - we're not using these anymore!
* Manually expand ASN.1 template macros - only change in generated assemblyjsing2015-07-253-16/+40
| | | | is due to line numbering.
* Expand ASN1_ITEM_TEMPLATE/ASN1_EX_TEMPLATE_TYPE/ASN1_ITEM_TEMPLATE_ENDjsing2015-07-244-22/+106
| | | | macros - the generated assembly only differs by changes to line numbers.
* Expand IMPLEMENT_ASN1_MSTRING macros - the generated assembly only differsjsing2015-07-242-6/+42
| | | | by changes to line numbers.
* Use V_ASN1_UNDEF instead of -1.miod2015-07-201-7/+7
| | | | | | | Make sure ASN1_primitive_new() will return NULL in *pval in all error situations. ok bcook@ doug@
* Check the return value of asn1_enc_save(). ok bcook@ doug@miod2015-07-201-2/+4
|
* When freeing an X509_CRL, if freeing the user-maintained meth_data fails,miod2015-07-201-3/+4
| | | | | do not forgot to nevertheless keep freeing the other fields. ok doug@ guenther@
* In X509_PKEY_new(), make sure all allocation failures push an error to themiod2015-07-201-7/+15
| | | | | error stack, not only the first one. ok guenther@ doug@
* Drop stupid (int) casts for the arguments of malloc() and friends. This ismiod2015-07-193-7/+7
| | | | | not 16-bit MS-DOS anymore. ok bcook@ tedu@
* Check the return value of ASN1_STRING_set(), for it may fail to allocatemiod2015-07-181-4/+9
| | | | | memory. Coverity CID 24810, 24846. ok bcook@ doug@
* Enforce V_ASN1_OCTET_STRING type before accessing the object as octet string;miod2015-07-161-2/+4
| | | | | from OpenSSL (RT #3683) ok doug@ jsing@
* Explicitely cast a char into unsigned long before shifting it left by 24, formiod2015-07-161-2/+2
| | | | | | | | | | | 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@
* Fix two theoretical NULL pointer dereferences which can only happen if youmiod2015-07-151-4/+9
| | | | | | | | 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@
* Remove d2i_X509_PKEY and i2d_X509_PKEY from the SSLeay days.doug2015-04-121-41/+1
| | | | | | | | i2d_X509_PKEY is a "needs to implement" and d2i_X509_PKEY is broken. Removed upstream in commit b1f3442857c1fd76e91941141bf671d19e90a79d. ok deraadt@, jsing@
* Fix several crash causing defects from OpenSSL.tedu2015-03-198-25/+52
| | | | | | | | | | | | | 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
* Remove IMPLEMENT_STACK_OF noops.jsing2015-02-221-2/+1
|
* Regenmiod2015-02-151-123/+124
|
* Remove asn1_ex_i2c() prototype, now that this function has been made static;miod2015-02-141-2/+1
| | | | reminded by bcook@
* Unchecked allocations in x509_name_canon().miod2015-02-141-1/+5
| | | | ok doug@ jsing@
* Memory leak upon error in X509_add1_{trust,reject}_object.miod2015-02-141-7/+23
| | | | ok doug@
* Manually expand IMPLEMENT_EXTERN_ASN1 macro (the only occurence in crypto).jsing2015-02-141-3/+10
| | | | Only change to generated assembly is due to line numbers.
* Remove IMPLEMENT_COMPAT_ASN1() and related support code. Nothing uses it inmiod2015-02-145-141/+7
| | | | | | libcrypto/libssl, and nothing seems to use it in the wild, apart from embedded copies of OpenSSL. ok jsing@
* Make asn1_ex_i2c() static. ok jsing@miod2015-02-141-2/+4
|
* Check i2d_name_canon() for failure (negative return). Coverity CID 78888.miod2015-02-141-6/+8
| | | | ok doug@ jsing@
* Possible NULL pointer dereferences. Coverity CID 21719, 21732.miod2015-02-142-3/+7
| | | | ok doug@ jsing@
* Expand ASN1_CHOICE*, ASN1_SEQUENCE* and associated macros, making thejsing2015-02-141-9/+53
| | | | | | | | | 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@
* Spell NULL correctly, be explicit with NULL checks and it is also easier tojsing2015-02-142-10/+6
| | | | | | initialise during declaration and drop the else statement. ok doug@ miod@
* prevent a crash with openssl asn1parse -genstr FORMATjsg2015-02-121-1/+5
| | | | | | aka ASN1_generate_nconf("FORMAT", NULL) ok krw@ beck@ jsing@
* Remove initialisers with default values from the ASN1 data structures.jsing2015-02-1117-188/+23
| | | | | Minor changes in generated assembly due to the compiler swapping from .quad 0/.long 0 to .zero, along with changes due to line numbering.
* Expand most of the ASN1_SEQUENCE* and associated macros, making the datajsing2015-02-1117-146/+950
| | | | | | | | | | 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@
* Enable building with -DOPENSSL_NO_DEPRECATED.doug2015-02-111-1/+2
| | | | | | | | | | | | | | | 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@
* unifdef OPENSSL_NO_RFC3779 - this is currently disabled and unlikely tojsing2015-02-101-9/+1
| | | | | | be enabled, mostly since people use SANs instead. ok beck@ guenther@
* Remove more IMPLEMENT_STACK_OF noops that have been hiding for the lastjsing2015-02-103-9/+3
| | | | 15 years.
* Replace assert() and OPENSSL_assert() calls with proper error return paths.miod2015-02-101-5/+6
| | | | Careful review, feedback & ok doug@ jsing@
* Remove default value initialisers for ASN1_ITEM. Minor changes to generatedjsing2015-02-101-93/+11
| | | | assembly due to switches between .quad and .zero for structs.
* Expand IMPLEMENT_ASN1_TYPE macros - no change to generated assembly.jsing2015-02-101-23/+221
|
* The IMPLEMENT_STACK_OF and IMPLEMENT_ASN1_SET_OF macros were turned intojsing2015-02-106-26/+6
| | | | | noops around 15 years ago. Remove multiple occurances of both that still exist in the code today.
* Place the IMPLEMENT_ASN1_.*FUNCTION.* macros under an #ifndefjsing2015-02-101-1/+4
| | | | LIBRESSL_INTERNAL - we do not need them any more.
* Expand IMPLEMENT_ASN1_ENCODE_FUNCTIONS_fname macros that got missed.jsing2015-02-102-4/+28
|
* Manually expand ASN1_ITEM_rptr macros that should have been expanded withjsing2015-02-107-15/+15
| | | | the IMPLEMENT_ASN1_DUP_FUNCTION macro.
* Expand the -IMPLEMENT_ASN1_ENCODE_FUNCTIONS_(const_)?fname macros so thatjsing2015-02-101-3/+27
| | | | | | | | 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@
* Expand the IMPLEMENT_ASN1_DUP_FUNCTION macro so that the code is visiblejsing2015-02-107-15/+55
| | | | | | | | | 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@
* Expand the IMPLEMENT_ASN1_FUNCTIONS_{const,fname,name} macros so that thejsing2015-02-102-8/+152
| | | | | | | | | 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@
* Expand the IMPLEMENT_ASN1_FUNCTIONS macro so that the code is visible andjsing2015-02-0919-60/+1044
| | | | | | | | | 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@
* Check memory allocation results, as well as stack pushes.miod2015-02-081-9/+34
| | | | | | Also fix a memory leak in one of the error paths of SMIME_read_ASN1(), spotted by doug@ tweaks&ok doug@ jsing@
* Don't leak addresses in error messages.miod2015-02-071-2/+2
|