summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_transcript.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-12-12Convert req.c to compile with opaque EVP_MD_CTX.tb1-25/+43
ok inoguchi
2021-12-12Convert passwd.c to opaque EVP_MD_CTX and add a bit of error checking.tb1-35/+72
tweak/ok inoguchi
2021-12-12Make speed.c compile with opaque EVP_CIPHER, EVP_MD and HMAC_CTX.tb1-20/+29
ok inoguchi
2021-12-12A few more simplifications using get0_pubkey instead of get_pubkey + free.tb1-9/+5
2021-12-12Simplify x509.c slightly by using X509_get0_pubkey() instead oftb1-5/+3
X509_get_pubkey() ok inoguchi
2021-12-12Make x509.c compile with opaque EVP_PKEY.tb1-7/+15
ok inoguchi
2021-12-12Use correct spelling of NULLtb1-2/+2
ok inoguchi
2021-12-12Make ts.c compile with opaque EVP_MD_CTX.tb1-5/+10
ok inoguchi
2021-12-12document the ub_* constantsschwarze1-2/+22
2021-12-12typoschwarze1-2/+2
2021-12-12New manual page providing a rudimentary description of BIO_new_NDEF(3).schwarze4-5/+127
The API surrounding this is so complicated and streaming is so rarely used in practice that describing this in more detail is not a priority right now. The documentation of the wrapper BIO_new_CMS(3) is also rather vague, and BIO_new_PKCS7() isn't described at all so far.
2021-12-12Rewrite X509_ALGOR_set_md() without reaching into EVP_MD.tb1-5/+3
ok inoguchi schwarze
2021-12-11Merge two bugfixes in ASN1_STRING_TABLE_add(3) and ASN1_STRING_TABLE_get(3)schwarze3-36/+189
from the OpenSSL 1.1.1 branch, which is still under a free license, mostly this commit: commit d35c0ff30b31be9fd5dcf3d552a16feb8de464bc Author: Dr. Stephen Henson <steve@openssl.org> Date: Fri Oct 19 15:06:31 2012 +0000 fix ASN1_STRING_TABLE_add so it can override existing string table values This fixes a segfault in ASN1_STRING_TABLE_add(3), which tried to change a static const entry when called with an nid already in the default table, and it switches the precedence of the two tables in ASN1_STRING_TABLE_get(3). In addition, it changes behaviour in the following minor ways: * Ignore negative minsize and maxsize arguments, not just -1. * Ignore a zero mask and zero flags. It's unclear whether these additional changes make the API absolutely better, but we want compatibility with OpenSSL in these functions. Tweaks & OK tb@.
2021-12-11Merge the deletion of <ctype.h>, which isn't used here,schwarze1-17/+21
and some style improvements from the OpenSSL 1.1.1 branch, which is still under a free license. No functional change. OK and additional tweaks tb@.
2021-12-11document STABLE_NO_MASK and STABLE_FLAGS_MALLOC,schwarze1-13/+32
mention which argument values can be used to not change the respective fields, and tweak a few additional wordings
2021-12-11two more "the the" fixes;jmc1-3/+3
2021-12-11Stop passing __FILE__ and __LINE__ to various libcrypto functions. The argumentsanton1-13/+13
are unused in the end anyway and occupies needless space, especially in ftp(1) shipped with the ramdisk. ok tb@
2021-12-10explain how X509_NAME_ENTRY_set_data(3) uses MBSTRING_FLAGschwarze1-5/+20
2021-12-10document the following constants:schwarze2-4/+28
B_ASN1_DIRECTORYSTRING, B_ASN1_PRINTABLE, B_ASN1_DISPLAYTEXT, B_ASN1_TIME, DIRSTRING_TYPE, PKCS9STRING_TYPE
2021-12-09document V_ASN1_SEQUENCE and V_ASN1_SETschwarze1-4/+9
2021-12-09document V_ASN1_BOOLEANschwarze1-2/+4
2021-12-09improve the documentation of V_ASN1_APP_CHOOSEschwarze2-6/+15
2021-12-09Mention V_ASN1_PRIMITIVE_TAG and V_ASN1_EOC.schwarze1-5/+14
Seeing the symbolic names in addition to the magic numbers makes it esier to understand the text.
2021-12-09add the missing STANDARDS sectionschwarze1-2/+8
2021-12-09Document V_ASN1_ANY.schwarze1-12/+15
While here, tweak some wordings a bit to make it less likely that readers confuse the type held by an ASN1_TYPE object with the type of the ASN1_TYPE object itself, which is always V_ASN1_ANY.
2021-12-09document V_ASN1_NEGschwarze1-3/+10
2021-12-09document V_ASN1_OBJECTschwarze1-2/+6
2021-12-09document V_ASN1_NULLschwarze1-2/+6
2021-12-09fix a typo in an .Xr argumentschwarze1-3/+3
2021-12-09Convert t1_enc.c to opaque EVP_MD_CTX.tb1-25/+26
ok inoguchi jsing
2021-12-09Convert ssl_srvr.c to opaque EVP_MD_CTX.tb1-42/+44
ok inoguchi jsing
2021-12-09Convert ssl_clnt.c to opaque EVP_MD_CTXtb1-26/+29
ok inoguchi jsing
2021-12-09Convert s3_cbc.c to opaque EVP_MD_CTX.tb1-9/+10
ok inoguchi jsing
2021-12-09Inline collect_data() in asn1_collect().jsing1-21/+12
While here stop assigning a size_t to an int without bounds checks. ok inoguchi@ tb@
2021-12-09Pull the recursion depth check up to the top of asn1_collect()jsing1-5/+6
ok inoguchi@ tb@
2021-12-09Remove handling of a NULL BUF_MEM from asn1_collect()jsing1-14/+9
asn1_collect() (and hence collect_data()) is never called without a BUF_MEM - the only caller that passed NULL was removed in OpenSSL commit e1cc0671ac5. ok inoguchi@ tb@
2021-12-09Fix missing return in asn1_compare_bytes()jsing1-1/+2
2021-12-09Add initial tests for coverage of ASN.1 complex/constructed types.jsing2-1/+228
2021-12-09Add initial tests for coverage of ASN.1 basic/primitive types.jsing2-1/+135
2021-12-09Fix an issue that might possibly turn into a DOS depending onschwarze1-3/+3
how application software uses the API function BIO_indent(3): If the caller asks for some output, but not more than some negative number of bytes, give them zero bytes of output rather than drowning them in nearly INT_MAX bytes. OK tb@
2021-12-09Add a section "NAMING CONVENTIONS".schwarze1-36/+285
There is no need to explain well-known acronyms that are widely used outside OpenSSL, too (like AES, ASN.1, CMS, ECDSA, PKCS...), but OpenSSL uses plenty of idiosyncratic naming elements that deserve to be explained (like d2i, ex, get0, ndef, sk, ...). Requested by jsing@; feedback and OK tb@.
2021-12-08lsearch(3): reimplement using lfind(3)cheloha1-32/+13
lsearch(3) is really just lfind(3) with an additional branch to append the key if lfind(3) fails. If we get rid of the underlying linear_base() function and move the search portion into lfind(3) and the key-copying portion into lsearch(3) we get smaller and simpler code. Misc. notes: - We do not need to keep the historical comment about errno. lsearch(3) is pure computation and does not set errno. That's really all you need to know. The specification reserves no errors, either. - We are using lfind(3) internally now, so it switches from PROTO_DEPRECATED to PROTO_NORMAL in hidden/search.h and needs DEF_WEAK in stdlib/lsearch.c. With advice from guenther@ on symbol housekeeping in libc. Thread: https://marc.info/?l=openbsd-tech&m=163885187632449&w=2 ok millert@
2021-12-08new manual page ASN1_bn_print(3)schwarze4-5/+126
2021-12-08document BIO_indent(3);schwarze1-12/+53
while here, improve some of the existing text in minor ways
2021-12-08mark c2i_ASN1_OBJECT as intentionally undocumented;schwarze1-2/+4
discussed with jsing@
2021-12-08mark i2c_ASN1_BIT_STRING, c2i_ASN1_BIT_STRING, and c2i_ASN1_INTEGERschwarze1-2/+5
as intentionally undocumented; discussed with jsing@
2021-12-07Simple conversion to opaque EVP_CIPHER.tb1-5/+9
2021-12-07be more specific which NETSCAPE stuff to ignore, and whyschwarze1-10/+7
2021-12-07Some improvements allowing to handle asn1.h and x509v3.h:schwarze1-10/+47
* handle multiple qualifiers on the function return type * handle function pointer type declarations * handle unions inside structs * handle forward struct declarations * handle "typedef const" * handle ASN1_F_, ASN1_R_, and X509V3_R_ error constants * handle "#if defined" in the same way as "#ifdef" * skip whitespace between "#" and "define" * skip whitespace before C comments * ignore TYPEDEF_D2I2D_OF
2021-12-07lsearch(3): append key to array with memmove(3) instead of memcpy(3)cheloha1-2/+7
If the key overlaps the end of the array, memcpy(3) mutates the key and copies a corrupted value into the end of the array. If we use memmove(3) instead we at least end up with a clean copy of the key at the end of the array. This is closer to the intended behavior. With input from millert@ and deraadt@. Thread: https://marc.info/?l=openbsd-tech&m=163880307403606&w=2 ok millert@