summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* two more "the the" fixes;jmc2021-12-111-3/+3
|
* Stop passing __FILE__ and __LINE__ to various libcrypto functions. The argumentsanton2021-12-111-13/+13
| | | | | | | are unused in the end anyway and occupies needless space, especially in ftp(1) shipped with the ramdisk. ok tb@
* explain how X509_NAME_ENTRY_set_data(3) uses MBSTRING_FLAGschwarze2021-12-101-5/+20
|
* document the following constants:schwarze2021-12-102-4/+28
| | | | | B_ASN1_DIRECTORYSTRING, B_ASN1_PRINTABLE, B_ASN1_DISPLAYTEXT, B_ASN1_TIME, DIRSTRING_TYPE, PKCS9STRING_TYPE
* document V_ASN1_SEQUENCE and V_ASN1_SETschwarze2021-12-091-4/+9
|
* document V_ASN1_BOOLEANschwarze2021-12-091-2/+4
|
* improve the documentation of V_ASN1_APP_CHOOSEschwarze2021-12-092-6/+15
|
* Mention V_ASN1_PRIMITIVE_TAG and V_ASN1_EOC.schwarze2021-12-091-5/+14
| | | | | Seeing the symbolic names in addition to the magic numbers makes it esier to understand the text.
* add the missing STANDARDS sectionschwarze2021-12-091-2/+8
|
* Document V_ASN1_ANY.schwarze2021-12-091-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.
* document V_ASN1_NEGschwarze2021-12-091-3/+10
|
* document V_ASN1_OBJECTschwarze2021-12-091-2/+6
|
* document V_ASN1_NULLschwarze2021-12-091-2/+6
|
* fix a typo in an .Xr argumentschwarze2021-12-091-3/+3
|
* Convert t1_enc.c to opaque EVP_MD_CTX.tb2021-12-091-25/+26
| | | | ok inoguchi jsing
* Convert ssl_srvr.c to opaque EVP_MD_CTX.tb2021-12-091-42/+44
| | | | ok inoguchi jsing
* Convert ssl_clnt.c to opaque EVP_MD_CTXtb2021-12-091-26/+29
| | | | ok inoguchi jsing
* Convert s3_cbc.c to opaque EVP_MD_CTX.tb2021-12-091-9/+10
| | | | ok inoguchi jsing
* Inline collect_data() in asn1_collect().jsing2021-12-091-21/+12
| | | | | | While here stop assigning a size_t to an int without bounds checks. ok inoguchi@ tb@
* Pull the recursion depth check up to the top of asn1_collect()jsing2021-12-091-5/+6
| | | | ok inoguchi@ tb@
* Remove handling of a NULL BUF_MEM from asn1_collect()jsing2021-12-091-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@
* Fix missing return in asn1_compare_bytes()jsing2021-12-091-1/+2
|
* Add initial tests for coverage of ASN.1 complex/constructed types.jsing2021-12-092-1/+228
|
* Add initial tests for coverage of ASN.1 basic/primitive types.jsing2021-12-092-1/+135
|
* Fix an issue that might possibly turn into a DOS depending onschwarze2021-12-091-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@
* Add a section "NAMING CONVENTIONS".schwarze2021-12-091-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@.
* lsearch(3): reimplement using lfind(3)cheloha2021-12-081-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@
* new manual page ASN1_bn_print(3)schwarze2021-12-084-5/+126
|
* document BIO_indent(3);schwarze2021-12-081-12/+53
| | | | while here, improve some of the existing text in minor ways
* mark c2i_ASN1_OBJECT as intentionally undocumented;schwarze2021-12-081-2/+4
| | | | discussed with jsing@
* mark i2c_ASN1_BIT_STRING, c2i_ASN1_BIT_STRING, and c2i_ASN1_INTEGERschwarze2021-12-081-2/+5
| | | | as intentionally undocumented; discussed with jsing@
* Simple conversion to opaque EVP_CIPHER.tb2021-12-071-5/+9
|
* be more specific which NETSCAPE stuff to ignore, and whyschwarze2021-12-071-10/+7
|
* Some improvements allowing to handle asn1.h and x509v3.h:schwarze2021-12-071-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
* lsearch(3): append key to array with memmove(3) instead of memcpy(3)cheloha2021-12-071-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@
* In the next major bump, some BN macros will become functions.schwarze2021-12-065-27/+11
| | | | | | In order to not forget it, already remove the statements that these APIs are currently implemented as macros: Not saying that doesn't make the documentation wrong.
* Clean up a bunch of dead code in s_server.c and s_socket.ctb2021-12-063-36/+21
| | | | | | | | | | | | jsg's analysis tool flagged a potential double free in do_server(). While this looks like a false positive, we can clean this code up a little: the host name passed to the callbacks isn't used by either sv_body() and www_body(), so it can be made local to do_accept() (an extra variable would not even be needed). Simplify the callbacks' signatures accordingly. Remove some commented out linger code that would never be used again anyway. ok inoguchi jsg
* Simplify DH_check_params a bit.tb2021-12-051-12/+4
| | | | | | | | It makes no sense to allocate an entire BN_CTX if we only use it to get a single BIGNUM, from which we subtract 1 to compare it to g. We can just use a plain BIGNUM and delete a bunch of lines. ok inoguchi jsing
* Add initial regress for CT.jsing2021-12-054-1/+415
| | | | This provides test coverage for SCT encoding/decoding.
* Add RCS markerstb2021-12-0513-0/+13
|
* gross trailing whitespacetb2021-12-041-16/+16
|
* List subdirectories as a simple list. Avoids a source of many mergetb2021-12-041-6/+8
| | | | | | conflicts in my work on making much of libcrypto opaque. discussed with jsing
* Annotate the structs to be moved to bn_lcl.h in the next bumptb2021-12-041-1/+5
| | | | ok inoguchi jsing
* Use BN_is_negative(p) instead of p->neg in one place.tb2021-12-041-2/+2
|
* Add #include "bn_lcl.h" to the files that will soon need it.tb2021-12-0415-15/+36
| | | | ok inoguchi jsing
* Implement the BN_to_montgomery() macro as a functiontb2021-12-042-2/+13
| | | | ok inoguchi jsing
* Implement the BN_is_negative macro as a functiontb2021-12-042-2/+13
| | | | ok inoguchi jsing
* Provide function implementations for various BN_* macrostb2021-12-042-4/+54
| | | | | | | | BN_abs_is_word, BN_is_{zero,one,word,odd}, BN_one, BN_zero_ex are now implemented as functions for internal use. They will be exposed publicly to replace the macros reaching into BIGNUM in the next bump. ok inoguchi jsing
* Provide replacement functions for the BN_{get,set,with}_flags() macros.tb2021-12-042-2/+34
| | | | ok inoguchi jsing
* Provide replacement functions for the BN_GENCB_set{,_old}() macrostb2021-12-042-3/+33
| | | | | | | | The function implementations are necessary to make BIGNUM opaque. They will be used in libcrypto internally until they will replace the macro implementations with the next bump. ok inoguchi jsing