summaryrefslogtreecommitdiff
path: root/src/lib/libc/stdlib/reallocarray.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-11-24Fix OCSP_basic_verify() cert chain construction in case thetb1-2/+5
OCSP_BASICRESP bs contains no certificates. From David von Oheimb (OpenSSL 121738d1) ok beck
2021-11-24Simplify slightly by using X509_get0_pubkey() thus eliminating thetb1-3/+2
need for EVP_PKEY_free(). ok beck
2021-11-24Fix a whitespace error that has annoyed me for way too longtb1-2/+2
2021-11-24Fix timestamp printing in Signed Certificate Timestampstb1-2/+1
Our ASN1_GENERALIZEDTIME_set() doesn't accept time strings with fractional seconds, so don't feed it milliseconds, but only seconds. Ensures that openssl x509 -text prints timestamps instead of skipping them. ok beck jsing
2021-11-24Add certificate transparency methods to the standard extensions.tb1-1/+7
This way, CT extensions in certs will be parsed by the new CT code when they are encountered. This gets rid of a lot of gibberish when looking at a cert with 'openssl x509 -text -noout -in server.pem' ok beck jsing
2021-11-24add the missing const qualifiers below EXAMPLES;schwarze1-8/+11
from <Malgorzata dot Olszowka at stunnel dot org> via OpenSSL commit 256989ce in the OpenSSL 1.1.1 branch, which is still under a free license
2021-11-24document ASN1_item_ndef_i2d(3)schwarze1-4/+22
2021-11-24In some situations, the verifier would discard the error on an unvalidatedbeck3-50/+91
certificte chain. This would happen when the verification callback was in use, instructing the verifier to continue unconditionally. This could lead to incorrect decisions being made in software.
2021-11-24Make the certificate transparency code build with the rest of the librarybeck8-7/+86
Do not expose it yet, this will wait for an upcoming bump ok tb@
2021-11-23Transform a mangled comment into something intelligible.tb1-2/+5
from beck
2021-11-23document ASN1_TYPE_set_int_octetstring(3) and ASN1_TYPE_get_int_octetstring(3)schwarze1-9/+77
2021-11-23Use LIBRESSL_NEXT_API to document the commented-out functions that aretb1-13/+13
not yet available. ok schwarze
2021-11-23document ASN1_TYPE_set_octetstring(3) and ASN1_TYPE_get_octetstring(3)schwarze1-5/+67
2021-11-23document a2i_ASN1_INTEGER(3),schwarze2-69/+135
i2a_ASN1_ENUMERATED(3), and a2i_ASN1_ENUMERATED(3)
2021-11-23re-align these copies of the a2i_*(3) code with f_string.c rev. 1.19schwarze2-28/+12
to fix the same double-counting of the backslash and to make the parsing stricter in the same way; OK tb@
2021-11-23In DH_set0_pqg() also set dh->length if q is set to match what OpenSSL do.tb1-1/+2
ok inoguchi jsing
2021-11-22Implement rfc6840 (AD flag processing) if using trusted name serversjca1-2/+14
libc can't do DNSSEC validation but it can ask a "security-aware" resolver to do so. Let's send queries with the AD flag set when appropriate, and let applications look at the AD flag in responses in a safe way, ie clear the AD flag if the resolvers aren't trusted. By default we only trust resolvers if resolv.conf(5) only lists name servers on localhost - the obvious candidates being unwind(8) and unbound(8). For non-localhost resolvers, an admin who trusts *all the name servers* listed in resolv.conf(5) *and the network path leading to them* can annotate this with "options trust-ad". AD flag processing gives ssh -o VerifyHostkeyDNS=Yes a chance to fetch SSHFP records in a secure manner, and tightens the situation for other applications, eg those using RES_USE_DNSSEC for DANE. It should be noted that postfix currently assumes trusted name servers by default and forces RES_TRUSTAD if available. RES_TRUSTAD and "options trust-ad" were first introduced in glibc by Florian Weimer. Florian Obser (florian@) contributed various improvements, fixed a bug and added automatic trust for name servers on localhost. ok florian@ phessler@
2021-11-22Fix typojob1-2/+2
thanks Matthias Schmidt
2021-11-22new manual page ASN1_NULL_new(3), also documenting ASN1_NULL_free(3)schwarze4-5/+70
2021-11-22new manual page a2d_ASN1_OBJECT(3);schwarze4-4/+106
while here, add a few STANDARDS references
2021-11-22document ASN1_OBJECT_create(3)schwarze1-10/+61
2021-11-21Tweak for opaque EVP_MD: use EVP_MD_type(dgst) instead of dgst->type.tb1-2/+2
2021-11-21Prepare ssltest for opaque DHtb1-18/+39
2021-11-21In asn1.h rev. 1.55 and asn1/a_time.c rev. 1.28, beck@schwarze1-3/+72
provided ASN1_TIME_diff(3). Merge the documentation from the OpenSSL 1.1.1 branch, which is still under a free license.
2021-11-21oops, i forgot the STANDARDS sectionschwarze1-1/+7
2021-11-21new manual page d2i_ASN1_BOOLEAN(3) also documenting i2d_ASN1_BOOLEAN(3)schwarze5-7/+137
2021-11-21wycheproof: modify RSA tests to work with opaque RSA structtb1-11/+57
2021-11-21wycheproof.go: modify some DSA and ECDSA code to work with opaque structstb1-5/+23
2021-11-20sorttb1-4/+4
2021-11-20Provide the bytestring APIs for libcrypto internal use.jsing5-3/+1771
Bring a copy of the bytestring APIs (CBB/CBS) from libssl, for use in libcrypto - these are not exposed publicly. Discussed with beck@ and tb@
2021-11-20Convert openssl(1) to using BN_GENCB on the heaptb4-51/+74
This is three times the same thing while genrsa needs some extra steps to deal with opaque BIGNUMs. We can also garbage collect some Win 3.1 contortions and use the conversion routines directly instead of doing them manually. ok jsing
2021-11-20Switch to BIO_up_ref() instead of adjusting references manually.tb2-16/+6
2021-11-20Use BIO_up_ref() instead of adjusting refcounts manuallytb1-9/+3
2021-11-20typo in commenttb1-3/+3
2021-11-20Document ASN1_INTEGER_cmp(3) and ASN1_INTEGER_dup(3).schwarze1-5/+93
While here, also improve the description of ASN1_INTEGER_set(3) and add a BUGS section explaining that several of these functions do not provide type safety.
2021-11-20Improve the description of ASN1_OCTET_STRING_cmp(3),schwarze1-12/+37
ASN1_OCTET_STRING_dup(3), and ASN1_OCTET_STRING_set(3). Explicitly say that they do not provide any type safety and explain what that means.
2021-11-20Make these files compile - not hooked up to build yet.beck13-220/+279
ok jsing@ tb@
2021-11-19libssl: don't reach for pkey->save_type.tb2-5/+5
For some strange historical reason ECDSA_sign() and ECDSA_verify}() have a type argument that they ignore. For another strange historical reason, the type passed to them from libssl is pkey->save_type, which is used to avoid expensive engine lookups when setting the pkey type... Whatever the aforementioned reasons were, we can't access pkey->save_type with the OpenSSL 1.1 API, and this is thus in the way of making EVP_PKEY opaque. Simply pass in 0 instead. ok jsing
2021-11-19Mark the X509_VERIFY_PARAM_ID variable type as intentionallyschwarze1-3/+16
undocumented. It is an opaque struct used only internally, as a sub-object of the public X509_VERIFY_PARAM type. All related API functions take X509_VERIFY_PARAM arguments, so X509_VERIFY_PARAM_ID is of no interest to the user.
2021-11-19Make function prototype parsing a bit stricter,schwarze1-1/+1
reducing the risk of accidental misparsing: Require whitespace after the function return type (before the asterisk indicating that the function returns a pointer, if any) and do not accept whitespace between the function name and the opening parenthesis of the parameter list. These changes are not a problem because we want that style for KNF reasons anyway.
2021-11-19minor KNF improvement, changing only whitespace, no code change:schwarze1-4/+4
say: return_type *function_name(args); not: return_type* function_name (args); OK tb@
2021-11-19new manual page ASN1_BIT_STRING_num_asc(3)schwarze4-5/+154
documenting the three functions using the BIT_STRING_BITNAME structure
2021-11-19add two missing .Dv macros;schwarze1-4/+4
markup bug found with regress/lib/libcrypto/man/check_complete.pl
2021-11-19Make the public API function a2i_ASN1_STRING(3) actually work.schwarze1-14/+6
It contained two bugs: 1. If an input line ended in a backslash requesting line continuation, there was duplicate code for removing that backslash, erroneously removing another byte from the input and often causing the function to return failure instead of correctly parsing valid input. 2. According to a comment in the source code, the former big "for" loop was intended to "clear all the crap off the end of the line", but actually, if there were multiple characters on the line that were not hexadecimal digits, only the last of those and everything following it was deleted, while all the earlier ones remained. Besides, code further down clearly intends to error out when there are invalid characters, which makes no sense if earlier code already deletes such characters. Hence the comment did not only contradict the code above it - but contradicted the code below it, too. Resolve these contradiction in favour of stricter parsing: No longer skip invalid characters but always error out when any are found. OK & "Unbelievable" tb@