Ssl.use_certificate failing with No such file or directory on an existing key file.Ssl.set_ip, Ssl.set_host and Ssl.set_client_SNI_hostname raise Invalid_argument instead of silently ignoring a value OpenSSL rejects. An unparsable IP address used to disable the check, accepting any certificate.Ssl.set_password_callback: an exception from the callback, or a password longer than OpenSSL's buffer, makes loading the key fail with Private_key_error instead of unwinding through OpenSSL or aborting.add_extra_chain_cert, add_cert_to_store, use_certificate_from_string, get_issuer, get_subject, and in read and write when given invalid arguments.Ssl.use_certificate_from_string decrypts the key with the context's password callback, like Ssl.use_certificate, instead of prompting on the terminal.Ssl.input_string returns what it read once the peer closes the connection, instead of always raising Read_error (#152).-lssl -lcrypto; on macOS they used to only add a search path, failing at link time (#55).Runtime_lock functions raised an exception that could not be caught.Invalid_argument on a string containing a NUL byte, instead of silently using the part before it.Ssl.Runtime_lock call non-allocating function on the C stubs and mark them with [@@noalloc] (#117).Ssl.context (#132)Ssl.native_library_version to query the underlying SSL library verion (#140)Ssl.Error: separate library number from reason code (#139, #142)Ssl.flush isn't successful (#104, #120)Ssl.Runtime_lock module. The functions in this module don't release the OCaml runtime lock. While they don't allow other OCaml threads to run concurrently, they don't perform any copying in the underlying data, leading certain workloads to be faster than their counterparts that release the lock. (#106)Ssl.output_string writes the whole string by retrying the operation with unwritten bytes (#103, #116)ERR_clear_error before the underlying OpenSSL call (#118)Ssl.Error to retrieve OpenSSL errors in a structured way (#119)Ssl.close_notify to perform a one-way shutdown (#63, #96).Add a few verification functions (#71):
add_extra_chain_cert to send additional chain certificates to the peer.add_cert_to_store: to allow verification of the peer certificate CA.set_ip: sets the expected IP address to be verified on an SSL socket.use_certificate_from_string (#71) to read any type of key (rather than just RSA).CAMLparamX and CAMLreturn calls (#90).digest function (#65, #66).client_verify_callback for NO_NAKED_POINTERS mode. A user-provided verification function in C remains an out-of-heap pointer for 4.x for compatibility, but is boxed for OCaml 5.x or 4.x when configured with --disable-naked-pointers. (#83)use_certificate_from_string (#54).get_verify_error_string, get_start_date, get_expiration_date (#57).version (#60).