summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/asn1 (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* remove NULL-checks before free()mmcc2015-12-231-5/+3
|
* assign pointer NULL rather than 0mmcc2015-12-231-2/+2
|
* assign pointer to NULL rather than 0mmcc2015-12-231-2/+2
|
* initialize a pointer to NULL rather than 0mmcc2015-12-221-2/+2
|
* move initialization of buf up to quell warnings and make it obvious the err ↵beck2015-12-121-4/+5
| | | | | | case is ok. ok bcook@
* prevent possibly use of uninitialized variablebeck2015-12-121-2/+2
| | | | ok bcook@
* make the counter a size_t as well, which quells a warning on visual studio 2015beck2015-12-121-2/+3
| | | | ok bcook@
* Fix for OpenSSL CVE-2015-3195beck2015-12-041-3/+8
| | | | ok djm@ jsing@
* Another change that is needed to restore the previous behaviour ofjsing2015-10-221-5/+3
| | | | | | | ASN1_{GENERALIZED,UTC}TIME_set_string(), which allows it to be called with a NULL pointer. ok beck@
* Restore previous behaviour and allowjsing2015-10-221-2/+7
| | | | | | | | ASN1_{GENERALIZED,UTC,}TIME_set_string() to be called with a NULL pointer. Found the hard way by @kinichiro on github. ok beck@
* Stop supporing "legcay" time formats that OpenSSL supports. Rewrite thebeck2015-10-195-587/+324
| | | | | | utctime and gentime wrappers accordingly. Along with some other cleanup. this also removes the need for timegm. ok bcook@ sthen@ jsing@
* Remove pointless externs - the structs are declared in the same files ajsing2015-10-161-3/+1
| | | | few lines above.
* Expand DECLARE_ASN1_ALLOC_FUNCTIONS and DECLARE_ASN1_FUNCTIONS_constjsing2015-10-161-3/+11
| | | | macros. The only change in the generated assembly is due to line numbering.
* Remove pointless uses of DECLARE_ASN1_ENCODE_FUNCTIONS_const.jsing2015-10-161-3/+1
| | | | | DECLARE_ASN1_FUNCTIONS_const already includes this macro so using both means we end up with duplicate function prototypes and externs.
* Put ASN1_dup() under #ifndef LIBRESSL_INTERNAL.jsing2015-10-131-5/+5
|
* Rip the guts out of another gibbering horror of a time comparison function, andbeck2015-10-082-37/+24
| | | | | mark it as #ifndef LIBRESSL_INTERNAL at least we don't use this. ok jsing@
* revert previous accidental commitbeck2015-10-082-23/+36
|
* Spelling in commentbeck2015-10-083-39/+25
|
* prefer limits.h over sys/limits.hbcook2015-10-061-3/+3
| | | | ok deraadt@
* Make sure dot is not set after tz - fixes incorrect handling, which allowsjsing2015-10-051-2/+2
| | | | | | 20151005171301+1.09Z to be treated as a valid time. ok beck@
* Apply some style(9), tweak a few things for readability and add somejsing2015-10-041-36/+40
| | | | | | additional bounds checks. ok beck@
* Flense the greasy black guts of unreadble string parsing code out of three areasbeck2015-10-025-179/+295
| | | | | | | | | in asn1 and x509 code, all dealing with an ASN1_TIME. This brings the parsing together in one function that converts into a struct tm. While we are at it this also brings us into conformance with RFC 5280 for times allowed in an X509 cert, as OpenSSL is very liberal with what it allows. input and fixes from deraadt@ jsing@ guethther@ and others. ok krw@, guenther@, jsing@
* Place all of the ASN1 M_ macros under #ifndef LIBRESSL_INTERNAL.jsing2015-09-301-30/+37
|
* Expand M_i2d_ASN1_OCTET_STRING macros - no change in generated assembly,jsing2015-09-301-3/+5
| | | | aside from line numbers.
* s/M_ASN1_ENUMERATED_free/ASN1_ENUMERATED_free/jsing2015-09-301-2/+2
|
* Replace M_ASN1_ENUMERATED_(free|new) with ASN1_ENUMERATED_(free|new).jsing2015-09-301-3/+3
|
* Replace M_ASN1_OCTET_STRING_(free|new) with ASN1_OCTET_STRING_(free|new).jsing2015-09-304-12/+12
|
* Replace M_ASN1_UTCTIME_(new|free) with ASN1_UTCTIME_(new|free).jsing2015-09-301-3/+3
|
* Replace M_ASN1_GENERALIZEDTIME_(new|free) withjsing2015-09-302-5/+5
| | | | ASN1_GENERALIZEDTIME_(new|free).
* Replace M_ASN1_INTEGER_(new|free) with ASN1_INTEGER_(new|free) - this isjsing2015-09-304-14/+14
| | | | | | | different from the macro expansion, but the result is the same. Also replace some ASN1_STRING_dup() with ASN1_INTEGER_dup(). ok beck@ doug@
* Remove unnecessary type assignments - M_ASN1_INTEGER_new() already setsjsing2015-09-301-3/+1
| | | | | | the type to V_ASN1_INTEGER. ok doug@
* Replace remaining M_ASN1_BIT_STRING_(new|free) macros with calls tojsing2015-09-291-3/+3
| | | | | | ASN1_BIT_STRING_(new|free). ok beck@ doug@
* Correct spelling of OPENSSL_cleanse.jsing2015-09-104-11/+14
| | | | ok miod@
* Replace remaining M_ASN1_STRING_* macros with calls to ASN1_STRING_*.jsing2015-09-101-9/+9
| | | | | | | This is not the same as the macro expansion, however the ASN1_STRING_* functions do match the macro expansions. ok doug@ miod@
* 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@