summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2018-04-18* Do not document the non-existent function RSA_null_method(3).Ingo Schwarze
* Add three missing const qualifiers to function prototypes. * Correct the argument type of RSA_new_method(3). * Remove duplicate decsription of RSA_flags(3) and RSA_new_method(3). * Make the description of method selection simpler, more precise, and more concise. * Correct description of the return value of RSA_set_method(3). * Stop referencing engine(3).
2018-04-15add a few new sentences regarding the big pictureIngo Schwarze
2018-04-15Rewrite the ENGINE_*(3) documentation from scratch - step 2,Ingo Schwarze
covering the remaining functions that were documented in engine(3), except for seven functions that are completely pointless and that were merely listed but not really documented.
2018-04-15Rewrite the ENGINE_*(3) documentation from scratch (step 1,Ingo Schwarze
covering 60% of the documented functions). The old, abominable engine(3) manual page shall die soon.
2018-04-14In eng_lib.c rev. 1.14 2018/04/14 07:18:37, tb@ allowed ENGINE_free(3)Ingo Schwarze
to accept a NULL argument. Document that. While here, make the related sentences more precise and less verbose. Tweaks and OK tb@.
2018-04-14Make ENGINE_free() succeed on NULL. Matches OpenSSL's behavior andTheo Buehler
simplifies the caller side. tested by & ok inoguchi; discussed with schwarze
2018-04-14make ENGINE_finish() succeed on NULL and simplify callers as inTheo Buehler
OpenSSL commit 7c96dbcdab9 by Rich Salz. This cleans up the caller side quite a bit and reduces the number of lines enclosed in #ifndef OPENSSL_NO_ENGINE. codesearch.debian.net shows that almost nothing checks the return value of ENGINE_finish(). While there, replace a few nearby 'if (!ptr)' with 'if (ptr == NULL)'. ok jsing, tested by & ok inoguchi
2018-04-12(file missed from previous commit)Theo de Raadt
Implement MAP_STACK option for mmap(). Synchronous faults (pagefault and syscall) confirm the stack register points at MAP_STACK memory, otherwise SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified to create a MAP_STACK sub-region which satisfies alignment requirements. Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the contents of the region -- there is no mprotect() equivalent operation, so there is no MAP_STACK-adding gadget. This opportunistic software-emulation of a stack protection bit makes stack-pivot operations during ROPchain fragile (kind of like removing a tool from the toolbox). original discussion with tedu, uvm work by stefan, testing by mortimer
2018-04-12Implement MAP_STACK option for mmap(). Synchronous faults (pagefault andTheo de Raadt
syscall) confirm the stack register points at MAP_STACK memory, otherwise SIGSEGV is delivered. sigaltstack() and pthread_attr_setstack() are modified to create a MAP_STACK sub-region which satisfies alignment requirements. Observe that MAP_STACK can only be set/cleared by mmap(), which zeroes the contents of the region -- there is no mprotect() equivalent operation, so there is no MAP_STACK-adding gadget. This opportunistic software-emulation of a stack protection bit makes stack-pivot operations during ROPchain fragile (kind of like removing a tool from the toolbox). original discussion with tedu, uvm work by stefan, testing by mortimer ok kettenis
2018-04-11In ssl.h rev. 1.155 2018/04/11 17:47:36, jsing@ changedIngo Schwarze
SSL_OP_TLS_ROLLBACK_BUG to no longer have any effect. Update the manual page.
2018-04-11Nuke SSL_OP_TLS_ROLLBACK_BUG - this is a workaround for buggy clients fromJoel Sing
around the SSLv3/TLSv1.0 period... and buggy clients are buggy. This also helps to clean up the RSA key exchange code. ok "kill it with fire" beck@ tb@
2018-04-10Write documentation for the control string parameter from scratch,Ingo Schwarze
collecting the information by inspecting the source code.
2018-04-08Cast -1 to (unsigned long) to appease clang 6 -Wc++11-narrowingJeremie Courreges-Anglas
Fixes at least ports/archivers/fuse-zip. ok millert@
2018-04-08Actually describe the parameters rather than calling facts BUGSIngo Schwarze
that aren't even small bugs. And stop talking about AF_LOCAL. Feedback and OK guenther@, OK jmc@.
2018-04-08Fail early if an X509_VERIFY_PARAM is poisoned - don't allowBob Beck
this to be "overridden" by the user supplied callback. ok jsing@
2018-04-08sort the list of data structures and add the missing ECDH and ECDSA;Ingo Schwarze
triggered by OpenSSL commit a73d990e Feb 27 19:02:24 2018 +0100, but with different content
2018-04-07tweak previous;Jason McIntyre
2018-04-07Correct man page for OpenSSL_no_config() to indicate that itBob Beck
suppresses any future config file loading. ok schwarze@ with a nit from jsing@
2018-04-07Remove function pointers for ssl_{read,write,peek}.Joel Sing
Now that everything goes through the same code path, we can remove a layer of indirection and just call ssl3_{read,write,peek} directly. ok beck@ inoguchi@
2018-04-07Nuke SSL3_FLAGS_DELAY_CLIENT_FINISHED and SSL3_FLAGS_POP_BUFFER.Joel Sing
These flags enabled experimental behaviour in the write path, which nothing uses. Removing this code greatly simplifies ssl3_write(). ok beck@ inoguchi@ sthen@ tb@
2018-04-07Correct tls_config_clear_keys() behaviour.Joel Sing
Previously this incorrectly called tls_keypair_clear(), which results in the private key being cleared, along with the certificate, OCSP staple and pubkey hash. This breaks OCSP stapling if tls_config_clear_keys() is called following tls_configure(), as is done by httpd. Fix this by calling tls_keypair_clear_key() so that only the private key is cleared, leaving the other public data untouched. While here, remove tls_keypair_clear() and fold the necessary parts into tls_keypair_free(). ok beck@
2018-04-07Switch to OPENSSL_init_ssl() and prevent an openssl configuration file fromJoel Sing
being loaded behind our back, at a later point. ok beck@
2018-04-07tweak previous;Jason McIntyre
2018-04-07sys/uio.h is not used anymoreOtto Moerbeek
2018-04-06Revert revision 1.12 commit. Although *pval looks like a C pointer,Alexander Bluhm
it may be something else. For primitive types it is possible that a boolean int has been casted to an ASN1_VALUE pointer. Then the 64 bit read access to *pval may crash due to alignent or 32 bit size. bug report Anton Borowka; OK tedu@ jsing@ miod@
2018-04-06Avoid leaking str if EVP_Digest() fails.Theo Buehler
Found and fixed by Bernd Edlinger as part of OpenSSL commit 83b4049ab75e9da1815e9c854a9297bca3d4af6b ok jsing, deraadt, bcook
2018-04-06poison for X509_VERIFY_PARAM'sBob Beck
Tighten up checks for various X509_VERIFY_PARAM functions, and allow for the verify param to be poisoned (preculding future successful cert validation) if the setting of host, ip, or email for certificate validation fails. (since many callers do not check the return code in the wild and blunder along anyway) Inspired by some discussions with Adam Langley. ok jsing@
2018-04-05Import pcap_set_immediate_mode() from mainline libpcap which allows aLawrence Teo
libpcap-based program to process packets as soon as they arrive. feedback from jasper@ ok jca@ (a long time ago)
2018-04-04mention which locale categories this is related to, and add SEE ALSOIngo Schwarze
2018-04-04add SEE ALSOIngo Schwarze
2018-04-04Split the useless localeconv(3) function out of the importantIngo Schwarze
setlocale(3) manual page, such that the latter becomes easier to read. No text change.
2018-04-04Fix two bugs in X509_NAME_add_entry(3):Ingo Schwarze
(1) Evaluate the "set" argument, which says whether to create a new RDN or to prepend or append to an existing one, before reusing it for a different purpose, i.e. for the "set" field of the new X509_NAME_ENTRY structure. (2) When incrementing of some "set" fields is needed, increment the correct ones: All those to the right of the newly inserted entry, but not the one of that entry itself. These two bugs caused wrong results whenever using loc != -1, i.e. whenever inserting rather than appending entries, even when using set == 0 only, that is, even when using single-values RDNs only. Both bugs have been continuously present since at least SSLeay-0.8.1 (released July 18, 1997) and the second one since at least SSLeay-0.8.0 (released June 25, 1997), so both are over twenty years old. I found these bugs by code inspection while trying to document the function X509_NAME_ENTRY_set(3), which is public, but undocumented in OpenSSL. OK beck@, jsing@
2018-04-03KNF: move two opening curly braces of function bodies to their own linesTheo Buehler
2018-04-03Typo: typdef -> typedef.Theo Buehler
From Edgar Pettijohn
2018-04-03Add missing $OpenBSD$ tags.Theo Buehler
2018-04-02In ssl.h rev. 1.151 2018/03/17 15:48:31, tb@ providedIngo Schwarze
SSL_CTX_get_default_passwd_cb(3) and SSL_CTX_get_default_passwd_cb_userdata(3). Merge the documentation, tweaked by me; from Christian Heimes <cheimes at redhat dot com> via OpenSSL commit 0c452abc Mar 2 12:53:40 2016 +0100.
2018-04-02In x509_vfy.h rev. 1.26 2018/03/17 15:43:32, tb@ providedIngo Schwarze
X509_STORE_get0_param(3); write the documentation from scratch.
2018-04-02In x509_vfy.h rev. 1.25 2018/03/17 15:39:43, tb@ providedIngo Schwarze
X509_OBJECT_get_type(3). It is undocumented in OpenSSL, so write some documentation from scratch.
2018-04-01When you replace an element in a sorted array with somethingIngo Schwarze
arbitrarily different, the array is in general no longer sorted. This commit copies a small hidden bugfix from the OpenSSL commit https://github.com/openssl/openssl/commit/fbb7b33b the rest of which is merely cosmetics. I discovered the bug independently while documenting sk_find(3). Keep the library's idea of when an empty stack or a one-element stack is sorted and when it is not bug-compatible with OpenSSL, even though in fact, empty and one-element stacks are of course always sorted. OK beck@
2018-03-31Mark pthread_equal() as unused inside libcPhilip Guenther
2018-03-30fix typo; from <Alex dot Gaynor at gmail dot com>Ingo Schwarze
via OpenSSL commit 3266cf58 Mar 10 13:13:23 2018 -0500
2018-03-30jsing@ points out to me that our X25519 interface was copied fromIngo Schwarze
BoringSSL rather than from OpenSSL and that it is not hooked into evp(3). So delete all text from OpenSSL including the Copyright and license and replace it by some text assembled from comments in BoringSSL code and headers and some text written myself, all under ISC license. In particular, also describe X25519_keypair(3), add SYNOPSIS, RETURN VALUES, STANDARDS, and a reference to D. J. Bernsteins instructions on how to use the algorithm. Delete the text related to EVP_PKEY describing features we do not support.
2018-03-30Add missing $OpenBSD$.Joel Sing
2018-03-30fix MALLOC_STATS; spotted by and ok semarie@Otto Moerbeek
2018-03-30include more information about how to create keys;Ingo Schwarze
from Matt Caswell <matt at openssl dot org> via OpenSSL commit f929439f Mar 15 12:19:16 2018 +0000
2018-03-30Add one short sentence each from the new OpenSSL X509_STORE_add_cert(3)Ingo Schwarze
manual page, which is below the threshold of originality, so there is no need to change the Copyright headers. The rest of that page is less clear and less precise than what we already have in our various pages.
2018-03-29Remove mention of link between message digests and public key algorithms.Ingo Schwarze
The comment in EVP_DigestInit.pod is: "EVP_MD_pkey_type() returns the NID of the public key signing algorithm associated with this digest. For example EVP_sha1() is associated with RSA so this will return NID_sha1WithRSAEncryption. Since digests and signature algorithms are no longer linked this function is only retained for compatibility reasons." So there is no link anymore. From <paul dot dale at oracle dot com> via OpenSSL commit 79b49fb0 Mar 20 10:03:10 2018 +1000
2018-03-29missing "const" in seven prototypes;Ingo Schwarze
from Kurt Roeckx <kurt at roeckx dot be> via OpenSSL commit b38fa985 Mar 10 16:32:55 2018 +0100
2018-03-29describe EC_POINT_get_affine_coordinates_GFp(3) andIngo Schwarze
EC_POINT_get_affine_coordinates_GF2m(3); from David Benjamin <davidben at google dot com> via OpenSSL commit ddc1caac Mar 6 14:00:24 2018 -0500
2018-03-29correct callback argument for BIO_puts(3);Ingo Schwarze
from <Bernd dot Edlinger at hotmail dot de> via OpenSSL commit c911e5da Mar 19 14:20:53 2018 +0100