summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/cms (follow)
Commit message (Collapse)AuthorAgeFilesLines
* KNF nittb2023-04-261-2/+3
|
* Move low level BIO_new_NDEF API to internal-onlytb2023-04-251-1/+2
|
* cms_io: sort includestb2023-04-211-3/+4
|
* cms_io: reverse polarity of an if statement to unindenttb2023-04-211-10/+12
|
* cms_io: Remove a stupid else branchtb2023-04-211-4/+2
| | | | | If you can initialize with functions, you can also initialize with constants...
* Rewrap some lines. No binary changetb2023-04-211-10/+10
|
* Unwrap a linetb2023-04-211-3/+2
|
* pk7_cb() and cms_cb()tb2023-03-121-4/+6
| | | | | | Add and fix FALLTHROUGH statement. I was confused for way too long since I hadn't noticed that this case fell through to the next. Also add and move some empty lines in the cms_cb() to make this resemble KNF more.
* Make header guards of internal headers consistenttb2022-11-261-4/+4
| | | | | Not all of them, only those that didn't leak into a public header... Yes.
* Make internal header file names consistenttb2022-11-2614-35/+35
| | | | | | | | | | | | | | | | Libcrypto currently has a mess of *_lcl.h, *_locl.h, and *_local.h names used for internal headers. Move all these headers we inherited from OpenSSL to *_local.h, reserving the name *_internal.h for our own code. Similarly, move dtls_locl.h and ssl_locl.h to dtls_local and ssl_local.h. constant_time_locl.h is moved to constant_time.h since it's special. Adjust all .c files in libcrypto, libssl and regress. The diff is mechanical with the exception of tls13_quic.c, where #include <ssl_locl.h> was fixed manually. discussed with jsing, no objection bcook
* Plug memory leak in CMS_add_simple_smimecap() in the unlikely event thattb2022-08-281-3/+6
| | | | | | ASN1_INTEGER_set() fails. ok jsing
* Remove mkerr.pl remnants from LibreSSLkn2022-07-121-2/+1
| | | | | | | This script is not used at all and files are edited by hand instead. Thus remove misleading comments incl. the obsolete script/config. Feedback OK jsing tb
* Add check for EVP_CIPHER_CTX_set_key_length return valueinoguchi2022-01-201-2/+2
| | | | | | It returns 1 on success and 0 for failure, never negative value. ok jsing@ millert@ tb@
* Check return value from EVP_CIPHER_CTX_new in cms_pwri.cinoguchi2022-01-191-2/+4
| | | | | | CID 345137 ok jsing@ tb@
* Garbage collect the app_items field of ASN1_ADBtb2022-01-141-2/+1
| | | | | | | This is unused and was removed in OpenSSL 5b70372d when it was replaced with an ASN.1 ADB callback (which we don't support). ok inoguchi jsing
* Move the now internal X.509-related structs into x509_lcl.h.tb2021-11-011-2/+3
| | | | | | | | Garbage collect the now unused LIBRESSL_CRYPTO_INTERNAL and LIBRESSL_OPAQUE_X509. Include "x509_lcl.h" where needed and fix a couple of unnecessary reacharounds. ok jsing
* Fix leak in cms_RecipientInfo_kekri_decrypt()tb2021-09-081-1/+2
| | | | | | | | Free ec->key before reassigning it. From OpenSSL 1.1.1, 58e1e397 ok inoguchi
* Remove remaining error *_str_functs[]jsing2020-06-051-137/+5
| | | | | | | | | A number of years ago we dropped the concept of having function names in errors, since it is not that useful and very quickly gets out of sync when refactoring. It would seem that some new ones got imported and some missed the last clean up. ok tb@ beck@ "kill it with fire"
* Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey.tb2019-10-043-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Note that the CMS code is currently disabled.) Port of Edlinger's Fix for CVE-2019-1563 from OpenSSL 1.1.1 (old license) tests from bluhm@ ok jsing commit e21f8cf78a125cd3c8c0d1a1a6c8bb0b901f893f Author: Bernd Edlinger <bernd.edlinger@hotmail.de> Date: Sun Sep 1 00:16:28 2019 +0200 Fix a padding oracle in PKCS7_dataDecode and CMS_decrypt_set1_pkey An attack is simple, if the first CMS_recipientInfo is valid but the second CMS_recipientInfo is chosen ciphertext. If the second recipientInfo decodes to PKCS #1 v1.5 form plaintext, the correct encryption key will be replaced by garbage, and the message cannot be decoded, but if the RSA decryption fails, the correct encryption key is used and the recipient will not notice the attack. As a work around for this potential attack the length of the decrypted key must be equal to the cipher default key length, in case the certifiate is not given and all recipientInfo are tried out. The old behaviour can be re-enabled in the CMS code by setting the CMS_DEBUG_DECRYPT flag. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9777) (cherry picked from commit 5840ed0cd1e6487d247efbc1a04136a41d7b3a37)
* Provide a local version of X509_get0_subject_key_id()jsing2019-08-121-3/+11
| | | | | It seems that the CMS code is currently the only code in existence that uses this function.
* Inline the equivalent of ASN1_TYPE_unpack_sequence().jsing2019-08-121-3/+6
|
* Use ERR_asprintf_error_data() instead of ERR_add_error_data().jsing2019-08-111-3/+3
|
* Remove unsupported GOST 2012 NIDs.jsing2019-08-111-3/+1
|
* Disable DES3 since we do not currently provide DES3 keywrap.jsing2019-08-111-1/+7
|
* Remove label that is now unused (due to arc4random_buf() returning void).jsing2019-08-111-3/+2
|
* Fix loading of CMS error strings.jsing2019-08-111-5/+5
|
* Include string.h for explicit_bzero().jsing2019-08-112-2/+6
|
* Expand M_ASN1_new_of and M_ASN1_free_of macros.jsing2019-08-119-39/+39
|
* Use arc4random_buf() instead of RAND_bytes().jsing2019-08-113-12/+8
| | | | This also removes return checks since arc4random_buf() does not fail.
* Include string.h for memcmp()/memcpy().jsing2019-08-115-5/+15
|
* Use freezero() rather than OPENSSL_clear_free().jsing2019-08-115-15/+15
|
* Use explicit_bzero() instead of OPENSSL_cleanse().jsing2019-08-112-5/+5
|
* Use malloc(3) and free(3), rather than OPENSSL_{malloc,free}().jsing2019-08-116-33/+33
|
* Convert CMSerr() to CMSerror().jsing2019-08-1111-240/+191
|
* Switch ASN.1 INT32 back to LONG.jsing2019-08-112-28/+28
|
* Expand a new macro that tried to get away...jsing2019-08-111-2/+8
|
* Expand ASN.1 macros.jsing2019-08-118-273/+1544
|
* We use DECLARE_STACK_OF rather than DEFINE_STACK_OF.jsing2019-08-112-7/+7
|
* Unlike OpenSSL we do not have our own special ssize_t.jsing2019-08-113-9/+9
|
* Fix style(9) and whitespace.jsing2019-08-101-210/+205
|
* More style(9) and whitespace.jsing2019-08-101-335/+294
|
* More style(9), whitespace and readability fixes.jsing2019-08-1014-675/+903
| | | | Files are identical once whitespace and newlines are removed.
* First pass at style(9).jsing2019-08-1014-4174/+4174
| | | | Whitespace only and no change according to diff -w.
* Fix includes for non-installed headers.jsing2019-08-109-25/+25
|
* Include cms.h instead of cmserr.h.jsing2019-08-101-2/+2
|
* Add $OpenBSD$ tag.jsing2019-08-101-0/+1
|
* Restore the per-file license for cms.h.jsing2019-08-101-5/+49
| | | | | This reverts the removal from OpenSSL 21dcbebc6e35419f1842f39a125374ea1ba45693.
* Provide cms.h.jsing2019-08-101-0/+515
| | | | | This is OpenSSL 1.1.1 cms.h and cmserr.h combined, essentially reverting OpenSSL 52df25cf2e656146cb3b206d8220124f0417d03f.
* Add $OpenBSD$ tags.jsing2019-08-1015-0/+15
|
* Restore the original per-file licenses for CMS.jsing2019-08-1014-70/+686
| | | | These were removed in OpenSSL b1322259d93cf6b6286f9febcd468b6a9f577d91.