summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove a few obvious comments, unwrap a few lines and annotate sometb2024-08-281-26/+9
| | | | functions for removal
* Turn X509V3_set_conf_lhash() into a nooptb2024-08-282-28/+3
| | | | | | Another legacy turd that was only used by PHP 7.4 and 8.0. ok beck jsing
* Add LCRYPTO_USED(X509_get_signature_info)tb2024-08-281-1/+2
|
* Disable X509V3_EXT{,_CRL,_REQ}_add_conf()tb2024-08-282-21/+11
| | | | | | | These legacy interfaces were only used by PHP 7.4 and 8.0 and they will be removed in an upcoming bump. ok beck jsing
* Annotate X509V3_CONF_CTX and its only instance for removaltb2024-08-281-4/+3
| | | | | | | A comment saying /* Maybe more here */ in a public also goes (yuck). Of course the promise was fulfilled by OpenSSL 3. ok beck jsing
* Make use of X509_get_signature_info() in check_sig_level()tb2024-08-281-20/+3
| | | | | | | | | | | | | | | If an auth_level (i.e., security_level, but not quite, because Viktor) was set on the X509_VERIFY_PARAM in the X509_STORE_CTX, the verifier would reject RSA-PSS or EdDSA certificates for insufficient security bits due to incorrect use of OBJ_find_sigid_algs() (this was also a bug in the initial security level implementation in OpenSSL 1.1). Using X509_get_signature_info() fixes this while preserving behavior for all other algorithms. Reported by Steffen Ullrich as one of multiple issues with RSA-PSS. ok jsing
* Document X509_get0_signature_info()tb2024-08-281-3/+70
| | | | | | | | Loosely based on the OpenSSL 1.1 documentation but extended quite a bit to explain what the flags mean and what info they do (and do not) convey. With the usual valuable feedback from jmc. ok jmc
* Implement X509_get_signature_info()tb2024-08-286-5/+204
| | | | | | | | | | | | | | | | This is a slightly strange combination of OBJ_find_sigid_algs() and the security level API necessary because OBJ_find_sigid_algs() on its own isn't smart enough for the special needs of RSA-PSS and EdDSA. The API extracts the hash's NID and the pubkey's NID from the certificate's signatureAlgorithm and invokes special handlers for RSA-PSS and EdDSA for retrieving the corresponding information. This isn't entirely free for RSA-PSS, but for now we don't cache this information. The security bits calculation is a bit hand-wavy, but that's something that comes along with this sort of numerology. ok jsing
* Fix underlying pkey of RSA-PSStb2024-08-281-2/+2
| | | | | | | | | | | | | | | | | | | | There are currently very few differences between the rsa_asn1_meth for plain RSA and the rsa_pss_asn1_meth for RSA-PSS apart from the obviously necessary differnces for base_method, pkey_id, pem_str and info (and the fact that RSA has support for legacy private key encoding). This had the lucky side effect that it didn't really matter which ameth one ended up using after OBJ_find_sigid_algs(). With the upcoming support for X509_get_signature_infO() for RSA-PSS, this needs to change as for RSA-PSS we need to decode the PSS parameters for extracting the "security level", whereas for RSA we can just use the hash length. Thus, for RSA-PSS switch pkey_id from the incorrect rsaEncryption to rassaPss. ok jsing PS: OBJ_find_sigid_algs() manual is no longer entirely correct, but this has been the case since we added Ed25519 support to obj_xref.
* Add a comment to OCSP_id_issuer_cmp() to make blind use of X509_ALGOR_cmp()tb2024-08-281-1/+6
| | | | | | less likely. ok jsing
* Clean up and simplify OCSP_cert_id_new()tb2024-08-281-21/+16
| | | | | | | Use proper NULL checks, set hashAlgorithm with X509_ALGOR_set0_by_nid(), and avoid a silly digerr label. ok jsing
* Avoid reaching into X509_ALGOR in ocsp_certid_print()tb2024-08-281-2/+6
| | | | ok jsing
* Avoid polluting the error stack when printing certificatestb2024-08-281-3/+17
| | | | | | | | | | | | | | For a certificate serial number between LONG_MAX and ULONG_MAX, the call to ASN1_INTEGER_get() fails and leaves an error on the stack because the check bs->length <= sizeof(long) doesn't quite do what it's supposed to do (bs is probably for bitstring, although the more common reading would be adequate, too.) Fix this by checking for non-negativity and using ASN1_INTEGER_get_uint64() and add a lengthy comment to explain the nonsense per beck's request. discussed with jsing ok beck
* cms_att.c: tidy includes and add x509_local.h for upcoming changetb2024-08-271-5/+5
|
* replace atoi(3) usage with strtonum(3); ok/tweaks tb@op2024-08-263-16/+64
|
* replace strtol(3) usage with strtonum(3); idea/ok/tweaks tb@op2024-08-262-46/+19
|
* ts.c: typo flaf -> flagtb2024-08-261-2/+2
|
* More precision on what exactly OCSP_id_cmp and OCSP_issuer_id_cmp compare.tb2024-08-241-7/+14
| | | | The existing description was lacking and incorrect, respectively.
* conf_def.c: add two trailing commastb2024-08-241-3/+3
|
* X509at_get_attr: zap trailing comma.tb2024-08-241-2/+2
| | | | reminded by mandoc -Tlint
* LibreSSL no longer supports adding X.501 attributes to an EVP_PKEYtb2024-08-247-206/+11
| | | | Remove the corresponding documentation.
* Switch UI_UTIL_read_pw* to LCRYPTO_UNUSED()tb2024-08-241-3/+3
| | | | ok jsing
* Neuter the completely broken UI_UTIL_read_pw* APItb2024-08-241-27/+5
| | | | | | | Return 0 on success, return <= 0 on failure. Sigh. In particular, if an allocation failed, the password that no one entered was considered valid. ok jsing
* Remove documentation of UI_UTIL_read_pw*tb2024-08-244-122/+7
| | | | | | | | According to some, a fail-open password verification function is par for the course for libcrypto. Unfortunately, we have been recommending its use over similarly named EVP functions after what amounted to a coin toss a few years back. Luckily enough, no one followed that advice and we can soon remove this API for good.
* Remove unwanted trailing newlines from err/warn format strings.anton2024-08-238-19/+19
|
* Remove use of CSP/LMK in pkcs12 create/verify teststb2024-08-231-3/+2
| | | | reminded by ... anton
* PKCS12_create(3): remove Xr to EVP_PKEY_add1_attr(3)tb2024-08-221-3/+2
| | | | | This API family has been neutered and will be removed in the next bump. Further cross references will be untangled in the future.
* Garbage collect unused attributes member from EVP_PKEYtb2024-08-222-4/+2
| | | | ok miod
* Remove copy_bag_attr()tb2024-08-221-33/+1
| | | | | | | It is no longer possible to set an attribute on an EVP_PKEY, so this code is dead. ok miod
* Neuter EVP_PKEY_add1_attr_by_NID()tb2024-08-221-36/+5
| | | | | | | The last consumer in openssl(1) pkcs12 has been removed, so we no longer need this function. ok miod
* openssl: adjust manual for LMK and CSP removaltb2024-08-221-10/+2
|
* openssl pkcs12: remove support for LMK and CSP attributestb2024-08-221-25/+1
| | | | | | | | | | | | | Documentation on what the Microsoft-specific local machine keyset and the cryptographic service provider are actually good for is hard to find. For some reason (perhaps one million and two arguments for PKCS12_create() was considered two too many) these hang off the EVP_PKEY in the attributes member, which serves no other purpose. Every use of EVP_PKEY (of which there are far too many) pays extra memory taxes for this fringe use case. This complication is not worth it. ok miod
* Use OPENSSL_config() instead of OPENSSL_load_builtin_modules()tb2024-08-181-2/+2
|
* conf_def.c: shuffle things into a slightly more sensibletb2024-08-181-80/+69
| | | | Reduces upcoming diffs and avoids annoying prototypes.
* Remove documentation for X509_REQ_[gs]et_extension_nidstb2024-08-181-30/+2
| | | | | These functions have been disabled for a while and they will be removed in the next major bump.
* Drop OpenSSL 3.0 interop testing infrastructuretb2024-08-188-75/+11
| | | | | The openssl 3.0 port was removed nearly a year ago shortly after the 7.4 release.
* Add support for openssl32 in interop testtb2024-08-187-9/+70
|
* Use struct __sFILE instead of FILE in thread locking callbackguenther2024-08-181-5/+6
| | | | | | | declarations to reduce <stdio.h> pollution. Declare __isthreaded in thread_private.h where it's really needed. ok deraadt@
* Zap a trailing comma to appease mandoc -Tlinttb2024-08-171-2/+2
|
* Remove docs of various X509_TRUST "functionality" that no longer existstb2024-08-174-334/+5
| | | | | | | Some macros are still exposed, but apart from the loss of a very nice way of saying "this is completely misdesigned, overengineered and not properly thought through" the only thing we would have learned from it is that this stuff is "probably useless".
* t_recvmmsg and t_sendmmsg were enabled in 2022guenther2024-08-151-2/+0
|
* Give libtls the same bump as libssltb2024-08-121-1/+1
|
* Bump minor after symbol additiontb2024-08-121-1/+1
|
* Add SSL_CTX_set1_cert_store() and SSL_CIPHER_get_handshake_digest() totb2024-08-121-0/+2
| | | | Symbols.list
* Expose SSL_CTX_set1_cert_store() and SSL_CIPHER_get_handshake_digest()tb2024-08-121-5/+1
|
* Make exit(), fclose(), fflush(), and freopen() comply with POSIX-2008guenther2024-08-121-6/+5
| | | | | | | | | requirements for setting the underlying file position when flushing read-mode streams, and make an fseek()-after-fflush() not change the underlying file position. Much testing, review, and assistance from tb@ ok tb@ millert@
* Add -CRLfile option to 'cms' sub commandjob2024-08-122-7/+38
| | | | | | | | | This option allows to verify certs in a CMS object against additional CRLs. Ported from work by Tom Harrison from APNIC OK tb@
* Add include path for crypto_arch.h.jsing2024-08-112-2/+4
|
* Provide and use crypto_arch.h.jsing2024-08-1123-35/+347
| | | | | | | | Provide a per architecture crypto_arch.h - this will be used in a similar manner to bn_arch.h and will allow for architecture specific #defines and static inline functions. Move the HAVE_AES_* and HAVE_RC4_* defines here. ok tb@
* Remove the empty ui_compat.htb2024-08-102-67/+1
| | | | unused in ports and on codesearch