diff options
| author | Enji Cooper <ngie@FreeBSD.org> | 2025-03-06 17:49:50 +0000 |
|---|---|---|
| committer | Enji Cooper <ngie@FreeBSD.org> | 2025-03-06 17:49:50 +0000 |
| commit | 1c34280346af8284acdc0eae39496811d37df25d (patch) | |
| tree | dbe4218057c550b3be955f331fc1198c6cab5f3f /doc/man3 | |
| parent | 108164cf95d9594884c2dcccba2691335e6f221b (diff) | |
Diffstat (limited to 'doc/man3')
| -rw-r--r-- | doc/man3/ASN1_TIME_set.pod | 10 | ||||
| -rw-r--r-- | doc/man3/ASN1_aux_cb.pod | 6 | ||||
| -rw-r--r-- | doc/man3/BIO_s_accept.pod | 6 | ||||
| -rw-r--r-- | doc/man3/BIO_s_connect.pod | 2 | ||||
| -rw-r--r-- | doc/man3/ECDSA_sign.pod | 4 | ||||
| -rw-r--r-- | doc/man3/EVP_EncryptInit.pod | 16 | ||||
| -rw-r--r-- | doc/man3/EVP_PKEY_decapsulate.pod | 9 | ||||
| -rw-r--r-- | doc/man3/EVP_PKEY_encapsulate.pod | 7 | ||||
| -rw-r--r-- | doc/man3/OSSL_CMP_CTX_new.pod | 6 | ||||
| -rw-r--r-- | doc/man3/OSSL_CMP_validate_msg.pod | 4 | ||||
| -rw-r--r-- | doc/man3/OSSL_HTTP_parse_url.pod | 11 | ||||
| -rw-r--r-- | doc/man3/OSSL_HTTP_transfer.pod | 6 | ||||
| -rw-r--r-- | doc/man3/OSSL_PARAM.pod | 2 | ||||
| -rw-r--r-- | doc/man3/OSSL_trace_enabled.pod | 8 | ||||
| -rw-r--r-- | doc/man3/SSL_CTX_new.pod | 10 | ||||
| -rw-r--r-- | doc/man3/SSL_get_shared_sigalgs.pod | 2 | ||||
| -rw-r--r-- | doc/man3/SSL_set_bio.pod | 9 | ||||
| -rw-r--r-- | doc/man3/X509V3_set_ctx.pod | 5 | ||||
| -rw-r--r-- | doc/man3/X509_STORE_CTX_new.pod | 19 | ||||
| -rw-r--r-- | doc/man3/X509_add_cert.pod | 3 | ||||
| -rw-r--r-- | doc/man3/X509_load_http.pod | 3 |
21 files changed, 100 insertions, 48 deletions
diff --git a/doc/man3/ASN1_TIME_set.pod b/doc/man3/ASN1_TIME_set.pod index 66d9fefe1af6..bdef3fdbb155 100644 --- a/doc/man3/ASN1_TIME_set.pod +++ b/doc/man3/ASN1_TIME_set.pod @@ -102,8 +102,8 @@ functions check the syntax of the time structure I<s>. The ASN1_TIME_print(), ASN1_UTCTIME_print() and ASN1_GENERALIZEDTIME_print() functions print the time structure I<s> to BIO I<b> in human readable -format. It will be of the format MMM DD HH:MM:SS YYYY [GMT], for example -"Feb 3 00:55:52 2015 GMT", which does not include a newline. +format. It will be of the format MMM DD HH:MM:SS[.s*] YYYY GMT, for example +"Feb E<32>3 00:55:52 2015 GMT", which does not include a newline. If the time structure has invalid format it prints out "Bad time value" and returns an error. The output for generalized time may include a fractional part following the second. @@ -179,6 +179,10 @@ starting with B<ASN1_UTCTIME> and B<ASN1_GENERALIZEDTIME> act only on that specific time format. The functions starting with B<ASN1_TIME> will operate on either format. +Users familiar with RFC822 should note that when specifying the flag +B<ASN1_DTFLGS_RFC822> the year will be formatted as documented above, +i.e., using 4 digits, not 2 as specified in RFC822. + =head1 BUGS ASN1_TIME_print(), ASN1_UTCTIME_print() and ASN1_GENERALIZEDTIME_print() do @@ -272,7 +276,7 @@ The ASN1_TIME_compare() function was added in OpenSSL 1.1.1. =head1 COPYRIGHT -Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2015-2025 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/ASN1_aux_cb.pod b/doc/man3/ASN1_aux_cb.pod index f87b51d5efac..9963ea135025 100644 --- a/doc/man3/ASN1_aux_cb.pod +++ b/doc/man3/ASN1_aux_cb.pod @@ -87,7 +87,7 @@ found for the purposes of reference counting. =item I<asn1_cb> A callback that will be invoked at various points during the processing of -the the B<ASN1_VALLUE>. See below for further details. +the B<ASN1_VALUE>. See below for further details. =item I<enc_offset> @@ -97,7 +97,7 @@ will be saved if the B<ASN1_AFLG_ENCODING> flag has been set. =item I<asn1_const_cb> A callback that will be invoked at various points during the processing of -the the B<ASN1_VALLUE>. This is used in preference to the I<asn1_cb> callback if +the B<ASN1_VALUE>. This is used in preference to the I<asn1_cb> callback if the B<ASN1_AFLG_CONST_CB> flag is set. See below for further details. =back @@ -274,7 +274,7 @@ B<ASN1_OP_GET0_PROPQ> operation types were added in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2021-2023 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2021-2025 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/BIO_s_accept.pod b/doc/man3/BIO_s_accept.pod index 25a752998cae..22b3d35b7374 100644 --- a/doc/man3/BIO_s_accept.pod +++ b/doc/man3/BIO_s_accept.pod @@ -169,16 +169,16 @@ BIO_set_bind_mode(), BIO_get_bind_mode() and BIO_do_accept() are macros. BIO_do_accept(), BIO_set_accept_name(), BIO_set_accept_port(), BIO_set_nbio_accept(), BIO_set_accept_bios(), BIO_set_accept_ip_family(), and BIO_set_bind_mode() -return 1 for success and <=0 for failure. +return 1 for success and <= 0 for failure. BIO_get_accept_name() returns the accept name or NULL on error. BIO_get_peer_name() returns the peer name or NULL on error. BIO_get_accept_port() returns the accept port as a string or NULL on error. BIO_get_peer_port() returns the peer port as a string or NULL on error. -BIO_get_accept_ip_family() returns the IP family or <=0 on error. +BIO_get_accept_ip_family() returns the IP family or <= 0 on error. -BIO_get_bind_mode() returns the set of B<BIO_BIND> flags, or <=0 on failure. +BIO_get_bind_mode() returns the set of B<BIO_BIND> flags, or <= 0 on failure. BIO_new_accept() returns a BIO or NULL on error. diff --git a/doc/man3/BIO_s_connect.pod b/doc/man3/BIO_s_connect.pod index ab813b32d031..a3c9e6428e47 100644 --- a/doc/man3/BIO_s_connect.pod +++ b/doc/man3/BIO_s_connect.pod @@ -59,7 +59,7 @@ a single call: that is it creates a new connect BIO with hostname B<name>. BIO_set_conn_hostname() uses the string B<name> to set the hostname. The hostname can be an IP address; if the address is an IPv6 one, it -must be enclosed with brackets C<[> and C<]>. +must be enclosed in brackets C<[> and C<]>. The hostname can also include the port in the form hostname:port; see L<BIO_parse_hostserv(3)> and BIO_set_conn_port() for details. diff --git a/doc/man3/ECDSA_sign.pod b/doc/man3/ECDSA_sign.pod index 7e5646665335..88e851885a01 100644 --- a/doc/man3/ECDSA_sign.pod +++ b/doc/man3/ECDSA_sign.pod @@ -52,7 +52,7 @@ size use L<EVP_PKEY_sign(3)> with a NULL I<sig> parameter. ECDSA_sign() computes a digital signature of the I<dgstlen> bytes hash value I<dgst> using the private EC key I<eckey>. The DER encoded signatures is -stored in I<sig> and its length is returned in I<sig_len>. Note: I<sig> must +stored in I<sig> and its length is returned in I<siglen>. Note: I<sig> must point to ECDSA_size(eckey) bytes of memory. The parameter I<type> is currently ignored. ECDSA_sign() is wrapper function for ECDSA_sign_ex() with I<kinv> and I<rp> set to NULL. @@ -82,7 +82,7 @@ used in a later call to ECDSA_sign_ex() or ECDSA_do_sign_ex(). ECDSA_sign_ex() computes a digital signature of the I<dgstlen> bytes hash value I<dgst> using the private EC key I<eckey> and the optional pre-computed values I<kinv> and I<rp>. The DER encoded signature is stored in I<sig> and its -length is returned in I<sig_len>. Note: I<sig> must point to ECDSA_size(eckey) +length is returned in I<siglen>. Note: I<sig> must point to ECDSA_size(eckey) bytes of memory. The parameter I<type> is ignored. ECDSA_do_sign_ex() is similar to ECDSA_sign_ex() except the signature is diff --git a/doc/man3/EVP_EncryptInit.pod b/doc/man3/EVP_EncryptInit.pod index f037d135c9da..a4635f994c2f 100644 --- a/doc/man3/EVP_EncryptInit.pod +++ b/doc/man3/EVP_EncryptInit.pod @@ -1284,6 +1284,15 @@ indicates whether the operation was successful. If it does not indicate success, the authentication operation has failed and any output data B<MUST NOT> be used as it is corrupted. +Please note that the number of authenticated bytes returned by +EVP_CipherUpdate() depends on the cipher used. Stream ciphers, such as ChaCha20 +or ciphers in GCM mode, can handle 1 byte at a time, resulting in an effective +"block" size of 1. Conversely, ciphers in OCB mode must process data one block +at a time, and the block size is returned. + +Regardless of the returned size, it is safe to pass unpadded data to an +EVP_CipherUpdate() call in a single operation. + =head2 GCM and OCB Modes The following I<ctrl>s are supported in GCM and OCB modes. @@ -1319,10 +1328,9 @@ For GCM, this call is only valid when decrypting data. For OCB, this call is valid when decrypting data to set the expected tag, and when encrypting to set the desired tag length. -In OCB mode, calling this when encrypting with C<tag> set to C<NULL> sets the -tag length. The tag length can only be set before specifying an IV. If this is -not called prior to setting the IV during encryption, then a default tag length -is used. +In OCB mode, calling this with C<tag> set to C<NULL> sets the tag length. +The tag length can only be set before specifying an IV. If this is not called +prior to setting the IV, then a default tag length is used. For OCB AES, the default tag length is 16 (i.e. 128 bits). It is also the maximum tag length for OCB. diff --git a/doc/man3/EVP_PKEY_decapsulate.pod b/doc/man3/EVP_PKEY_decapsulate.pod index 819291627bb8..cd6f5f0221a2 100644 --- a/doc/man3/EVP_PKEY_decapsulate.pod +++ b/doc/man3/EVP_PKEY_decapsulate.pod @@ -25,10 +25,13 @@ specifying the private key to use. The EVP_PKEY_decapsulate() function performs a private key decapsulation operation using I<ctx>. The data to be decapsulated is specified using the I<wrapped> and I<wrappedlen> parameters. -If I<unwrapped> is NULL then the maximum size of the output secret buffer +If I<unwrapped> is NULL then the size of the output secret buffer is written to I<*unwrappedlen>. If I<unwrapped> is not NULL and the call is successful then the decapsulated secret data is written to I<unwrapped> -and the amount of data written to I<*unwrappedlen>. +and the amount of data written to I<*unwrappedlen>. Note that, if I<unwrappedlen> +is not NULL in this call, the value it points to must be initialised to the length of +I<unwrapped>, so that the call can validate it is of sufficient size to hold the +result of the operation. =head1 NOTES @@ -57,7 +60,7 @@ Decapsulate data using RSA: unsigned char *secret = NULL;; ctx = EVP_PKEY_CTX_new_from_pkey(libctx, rsa_priv_key, NULL); - if (ctx = NULL) + if (ctx == NULL) /* Error */ if (EVP_PKEY_decapsulate_init(ctx, NULL) <= 0) /* Error */ diff --git a/doc/man3/EVP_PKEY_encapsulate.pod b/doc/man3/EVP_PKEY_encapsulate.pod index 0ee7d627904d..eb51836d7951 100644 --- a/doc/man3/EVP_PKEY_encapsulate.pod +++ b/doc/man3/EVP_PKEY_encapsulate.pod @@ -35,7 +35,10 @@ unless I<genkeylen> is NULL. If I<wrappedkey> is not NULL and the call is successful then the internally generated key is written to I<genkey> and its size is written to I<*genkeylen>. The encapsulated version of the generated key is written to -I<wrappedkey> and its size is written to I<*wrappedkeylen>. +I<wrappedkey> and its size is written to I<*wrappedkeylen>. Note that if +I<wrappedlen> is not NULL, then the value it points to must initially hold the size of +the I<unwrapped> buffer so that its size can be validated by the call, ensuring +it is large enough to hold the result written to I<wrapped>. =head1 NOTES @@ -63,7 +66,7 @@ Encapsulate an RSASVE key (for RSA keys). unsigned char *out = NULL, *secret = NULL; ctx = EVP_PKEY_CTX_new_from_pkey(libctx, rsa_pub_key, NULL); - if (ctx = NULL) + if (ctx == NULL) /* Error */ if (EVP_PKEY_encapsulate_init(ctx, NULL) <= 0) /* Error */ diff --git a/doc/man3/OSSL_CMP_CTX_new.pod b/doc/man3/OSSL_CMP_CTX_new.pod index cab88ae88c91..f2a38b0adef4 100644 --- a/doc/man3/OSSL_CMP_CTX_new.pod +++ b/doc/man3/OSSL_CMP_CTX_new.pod @@ -355,8 +355,10 @@ If TLS is not used this defaults to the value of the environment variable C<http_proxy> if set, else C<HTTP_PROXY>. Otherwise defaults to the value of C<https_proxy> if set, else C<HTTPS_PROXY>. An empty proxy string specifies not to use a proxy. -Else the format is C<[http[s]://]address[:port][/path]>, -where any path given is ignored. +Otherwise the format is +C<[http[s]://][userinfo@]host[:port][/path][?query][#fragment]>, +where any given userinfo, path, query, and fragment is ignored. +If the host string is an IPv6 address, it must be enclosed in C<[> and C<]>. The default port number is 80, or 443 in case C<https:> is given. OSSL_CMP_CTX_set1_no_proxy() sets the list of server hostnames not to use diff --git a/doc/man3/OSSL_CMP_validate_msg.pod b/doc/man3/OSSL_CMP_validate_msg.pod index 555624a40358..c5e68065beff 100644 --- a/doc/man3/OSSL_CMP_validate_msg.pod +++ b/doc/man3/OSSL_CMP_validate_msg.pod @@ -44,7 +44,7 @@ any self-issued certificate from the I<msg> extraCerts field may be used as a trust anchor for the path verification of an 'acceptable' cert if it can be used also to validate the issued certificate returned in the IP message. This is according to TS 33.310 [Network Domain Security (NDS); Authentication Framework -(AF)] document specified by the The 3rd Generation Partnership Project (3GPP). +(AF)] document specified by The 3rd Generation Partnership Project (3GPP). Note that using this option is dangerous as the certificate obtained this way has not been authenticated (at least not at CMP level). Taking it over as a trust anchor implements trust-on-first-use (TOFU). @@ -77,7 +77,7 @@ The OpenSSL CMP support was added in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2007-2024 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2007-2025 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/OSSL_HTTP_parse_url.pod b/doc/man3/OSSL_HTTP_parse_url.pod index 768f0acdb14c..4379c122d66a 100644 --- a/doc/man3/OSSL_HTTP_parse_url.pod +++ b/doc/man3/OSSL_HTTP_parse_url.pod @@ -42,20 +42,25 @@ take any further default value from the C<HTTP_PROXY> environment variable, or from C<HTTPS_PROXY> if I<use_ssl> is nonzero. If I<no_proxy> is NULL, take any default exclusion value from the C<no_proxy> environment variable, or else from C<NO_PROXY>. -Return the determined proxy hostname unless the exclusion contains I<server>. +Return the determined proxy host unless the exclusion value, +which is a list of proxy hosts separated by C<,> and/or whitespace, +contains I<server>. Otherwise return NULL. +When I<server> is a string delimited by C<[> and C<]>, which are used for IPv6 +addresses, the enclosing C<[> and C<]> are stripped prior to comparison. OSSL_parse_url() parses its input string I<url> as a URL of the form C<[scheme://][userinfo@]host[:port][/path][?query][#fragment]> and splits it up into scheme, userinfo, host, port, path, query, and fragment components. The host (or server) component may be a DNS name or an IP address -where IPv6 addresses should be enclosed in square brackets C<[> and C<]>. +where IPv6 addresses must be enclosed in square brackets C<[> and C<]>. The port component is optional and defaults to C<0>. If given, it must be in decimal form. If the I<pport_num> argument is not NULL the integer value of the port number is assigned to I<*pport_num> on success. The path component is also optional and defaults to C</>. Each non-NULL result pointer argument I<pscheme>, I<puser>, I<phost>, I<pport>, I<ppath>, I<pquery>, and I<pfrag>, is assigned the respective url component. +Any IPv6 address in I<*phost> is enclosed in C<[> and C<]>. On success, they are guaranteed to contain non-NULL string pointers, else NULL. It is the responsibility of the caller to free them using L<OPENSSL_free(3)>. If I<pquery> is NULL, any given query component is handled as part of the path. @@ -70,7 +75,7 @@ and the scheme is C<https>, else 0. The port component is optional and defaults to C<443> if the scheme is C<https>, else C<80>. Note that relative paths must be given with a leading C</>, -otherwise the first path element is interpreted as the hostname. +otherwise the first path element is interpreted as the host. Calling the deprecated function OCSP_parse_url(url, host, port, path, ssl) is equivalent to diff --git a/doc/man3/OSSL_HTTP_transfer.pod b/doc/man3/OSSL_HTTP_transfer.pod index 716e365ef50d..6da1d91b9f37 100644 --- a/doc/man3/OSSL_HTTP_transfer.pod +++ b/doc/man3/OSSL_HTTP_transfer.pod @@ -77,12 +77,14 @@ If TLS is not used this defaults to the environment variable C<http_proxy> if set, else C<HTTP_PROXY>. If I<use_ssl> != 0 it defaults to C<https_proxy> if set, else C<HTTPS_PROXY>. An empty proxy string C<""> forbids using a proxy. -Else the format is +Otherwise, the format is C<[http[s]://][userinfo@]host[:port][/path][?query][#fragment]>, where any userinfo, path, query, and fragment given is ignored. +If the host string is an IPv6 address, it must be enclosed in C<[> and C<]>. The default proxy port number is 80, or 443 in case "https:" is given. The HTTP client functions connect via the given proxy unless the I<server> -is found in the optional list I<no_proxy> of proxy hostnames (if not NULL; +is found in the optional list I<no_proxy> of proxy hostnames or IP addresses +separated by C<,> and/or whitespace (if not NULL; default is the environment variable C<no_proxy> if set, else C<NO_PROXY>). Proxying plain HTTP is supported directly, while using a proxy for HTTPS connections requires a suitable callback function diff --git a/doc/man3/OSSL_PARAM.pod b/doc/man3/OSSL_PARAM.pod index 1e5bf06cf767..22fd0f0d7dd7 100644 --- a/doc/man3/OSSL_PARAM.pod +++ b/doc/man3/OSSL_PARAM.pod @@ -11,7 +11,7 @@ OSSL_PARAM - a structure to pass or request object parameters typedef struct ossl_param_st OSSL_PARAM; struct ossl_param_st { const char *key; /* the name of the parameter */ - unsigned char data_type; /* declare what kind of content is in data */ + unsigned int data_type; /* declare what kind of content is in data */ void *data; /* value being passed in or out */ size_t data_size; /* data size */ size_t return_size; /* returned size */ diff --git a/doc/man3/OSSL_trace_enabled.pod b/doc/man3/OSSL_trace_enabled.pod index f9c9dffd8c6a..bad5b1515353 100644 --- a/doc/man3/OSSL_trace_enabled.pod +++ b/doc/man3/OSSL_trace_enabled.pod @@ -88,9 +88,10 @@ but rather uses a set of convenience macros, see the L</Macros> section below. OSSL_trace_enabled() can be used to check if tracing for the given I<category> is enabled. -OSSL_trace_begin() is used to starts a tracing section, and get the -channel for the given I<category> in form of a BIO. +OSSL_trace_begin() is used to start a tracing section, +and get the channel for the given I<category> in form of a BIO. This BIO can only be used for output. +The pointer returned is NULL if the category is invalid or not enabled. OSSL_trace_end() is used to end a tracing section. @@ -187,6 +188,9 @@ expands to =head1 NOTES +It is not needed to guard trace output function calls like +I<OSSL_TRACE(category, ...)> by I<OSSL_TRACE_ENABLED(category)>. + If producing the trace output requires carrying out auxiliary calculations, this auxiliary code should be placed inside a conditional block which is executed only if the trace category is enabled. diff --git a/doc/man3/SSL_CTX_new.pod b/doc/man3/SSL_CTX_new.pod index f467f93659b5..627d9e7f0dc3 100644 --- a/doc/man3/SSL_CTX_new.pod +++ b/doc/man3/SSL_CTX_new.pod @@ -104,10 +104,12 @@ On session establishment, by default, no peer credentials verification is done. This must be explicitly requested, typically using L<SSL_CTX_set_verify(3)>. For verifying peer certificates many options can be set using various functions such as L<SSL_CTX_load_verify_locations(3)> and L<SSL_CTX_set1_param(3)>. -The L<X509_VERIFY_PARAM_set_purpose(3)> function can be used, also in conjunction -with L<SSL_CTX_get0_param(3)>, to set the intended purpose of the session. -The default is B<X509_PURPOSE_SSL_SERVER> on the client side + +The SSL/(D)TLS implementation uses the L<X509_STORE_CTX_set_default(3)> +function to prepare checks for B<X509_PURPOSE_SSL_SERVER> on the client side and B<X509_PURPOSE_SSL_CLIENT> on the server side. +The L<X509_VERIFY_PARAM_set_purpose(3)> function can be used, also in conjunction +with L<SSL_CTX_get0_param(3)>, to override the default purpose of the session. The SSL_CTX object uses I<method> as the connection method. Three method variants are available: a generic method (for either client or @@ -228,7 +230,7 @@ SSL_CTX_up_ref() returns 1 for success and 0 for failure. =head1 SEE ALSO -L<SSL_CTX_set_options(3)>, L<SSL_CTX_free(3)>, +L<SSL_CTX_set_options(3)>, L<SSL_CTX_free(3)>, L<X509_STORE_CTX_set_default(3)>, SSL_CTX_set_verify(3), L<SSL_CTX_set1_param(3)>, L<SSL_CTX_get0_param(3)>, L<SSL_connect(3)>, L<SSL_accept(3)>, L<SSL_CTX_set_min_proto_version(3)>, L<ssl(7)>, L<SSL_set_connect_state(3)> diff --git a/doc/man3/SSL_get_shared_sigalgs.pod b/doc/man3/SSL_get_shared_sigalgs.pod index c18114cdf472..cb9ce025002f 100644 --- a/doc/man3/SSL_get_shared_sigalgs.pod +++ b/doc/man3/SSL_get_shared_sigalgs.pod @@ -64,7 +64,7 @@ ordered according to configuration and peer preferences. The raw values correspond to the on the wire form as defined by RFC5246 et al. The NIDs are OpenSSL equivalents. For example if the peer sent sha256(4) and rsa(1) then B<*rhash> would be 4, B<*rsign> 1, B<*phash> NID_sha256, B<*psig> -NID_rsaEncryption and B<*psighash> NID_sha256WithRSAEncryption. +NID_rsaEncryption and B<*psignhash> NID_sha256WithRSAEncryption. If a signature algorithm is not recognised the corresponding NIDs will be set to B<NID_undef>. This may be because the value is not supported, diff --git a/doc/man3/SSL_set_bio.pod b/doc/man3/SSL_set_bio.pod index c666dc466ecd..aaffeedf779b 100644 --- a/doc/man3/SSL_set_bio.pod +++ b/doc/man3/SSL_set_bio.pod @@ -23,6 +23,9 @@ function, any existing B<rbio> that was previously set will also be freed via a call to L<BIO_free_all(3)> (this includes the case where the B<rbio> is set to the same value as previously). +If using a custom BIO, B<rbio> must implement either +L<BIO_meth_set_read_ex(3)> or L<BIO_meth_set_read(3)>. + SSL_set0_wbio() works in the same as SSL_set0_rbio() except that it connects the BIO B<wbio> for the write operations of the B<ssl> object. Note that if the rbio and wbio are the same then SSL_set0_rbio() and SSL_set0_wbio() each take @@ -30,6 +33,12 @@ ownership of one reference. Therefore, it may be necessary to increment the number of references available using L<BIO_up_ref(3)> before calling the set0 functions. +If using a custom BIO, B<wbio> must implement +L<BIO_meth_set_write_ex(3)> or L<BIO_meth_set_write(3)>. It additionally must +implement L<BIO_flush(3)> using B<BIO_CTRL_FLUSH> and L<BIO_meth_set_ctrl(3)>. +If flushing is unnecessary with B<wbio>, L<BIO_flush(3)> should return one and +do nothing. + SSL_set_bio() is similar to SSL_set0_rbio() and SSL_set0_wbio() except that it connects both the B<rbio> and the B<wbio> at the same time, and transfers the ownership of B<rbio> and B<wbio> to B<ssl> according to diff --git a/doc/man3/X509V3_set_ctx.pod b/doc/man3/X509V3_set_ctx.pod index 8287802e41b2..7819c344f751 100644 --- a/doc/man3/X509V3_set_ctx.pod +++ b/doc/man3/X509V3_set_ctx.pod @@ -42,8 +42,7 @@ or not) to provide fallback data for the authority key identifier extension. =head1 RETURN VALUES -X509V3_set_ctx() and X509V3_set_issuer_pkey() -return 1 on success and 0 on error. +X509V3_set_issuer_pkey() returns 1 on success and 0 on error. =head1 SEE ALSO @@ -57,7 +56,7 @@ CTX_TEST was deprecated in OpenSSL 3.0; use X509V3_CTX_TEST instead. =head1 COPYRIGHT -Copyright 2015-2021 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2015-2025 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/X509_STORE_CTX_new.pod b/doc/man3/X509_STORE_CTX_new.pod index c508a1d3fc1b..9929a98e0cf5 100644 --- a/doc/man3/X509_STORE_CTX_new.pod +++ b/doc/man3/X509_STORE_CTX_new.pod @@ -74,6 +74,12 @@ X509_STORE_CTX_free() completely frees up I<ctx>. After this call I<ctx> is no longer valid. If I<ctx> is NULL nothing is done. +X509_STORE_CTX_init() sets up I<ctx> for a subsequent verification operation. + +X509_STORE_CTX_init() initializes the internal state and resources of the +given I<ctx>. Among others, it sets the verification parameters associcated +with the method name C<default>, which includes the C<any> purpose, +and takes over callback function pointers from I<trust_store> (unless NULL). It must be called before each call to L<X509_verify_cert(3)> or L<X509_STORE_CTX_verify(3)>, i.e., a context is only good for one verification. If you want to verify a further certificate or chain with the same I<ctx> @@ -144,12 +150,13 @@ by I<ctx> to be I<chain>. Ownership of the chain is transferred to I<ctx>, and so it should not be free'd by the caller. -X509_STORE_CTX_set_default() looks up and sets the default verification -method to I<name>. This uses the function X509_VERIFY_PARAM_lookup() to -find an appropriate set of parameters from the purpose identifier I<name>. -Currently defined purposes are C<sslclient>, C<sslserver>, C<nssslserver>, -C<smimesign>, C<smimeencrypt>, C<crlsign>, C<ocsphelper>, C<timestampsign>, -and C<any>. +X509_STORE_CTX_set_default() looks up and sets the default verification method. +This uses the function X509_VERIFY_PARAM_lookup() to find +the set of parameters associated with the given verification method I<name>. +Among others, the parameters determine the trust model and verification purpose. +More detail, including the list of currently predefined methods, +is described for the B<-verify_name> command-line option +in L<openssl-verification-options(1)/Verification Options>. X509_STORE_CTX_set_verify() provides the capability for overriding the default verify function. This function is responsible for verifying chain signatures and diff --git a/doc/man3/X509_add_cert.pod b/doc/man3/X509_add_cert.pod index 907164e9710e..f59b93ba54d4 100644 --- a/doc/man3/X509_add_cert.pod +++ b/doc/man3/X509_add_cert.pod @@ -16,6 +16,7 @@ X509 certificate list addition functions =head1 DESCRIPTION X509_add_cert() adds a certificate I<cert> to the given list I<sk>. +It is an error for the I<cert> argument to be NULL. X509_add_certs() adds a list of certificate I<certs> to the given list I<sk>. The I<certs> argument may be NULL, which implies no effect. @@ -66,7 +67,7 @@ were added in OpenSSL 3.0. =head1 COPYRIGHT -Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. +Copyright 2019-2025 The OpenSSL Project Authors. All Rights Reserved. Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy diff --git a/doc/man3/X509_load_http.pod b/doc/man3/X509_load_http.pod index a147c43caa3f..e17330b05587 100644 --- a/doc/man3/X509_load_http.pod +++ b/doc/man3/X509_load_http.pod @@ -27,6 +27,9 @@ see L<openssl_user_macros(7)>: X509_load_http() and X509_CRL_load_http() loads a certificate or a CRL, respectively, in ASN.1 format using HTTP from the given B<url>. +Maximum size of the HTTP response is 100 kB for certificates and 32 MB for CRLs +and hard coded in the functions. + If B<bio> is given and B<rbio> is NULL then this BIO is used instead of an internal one for connecting, writing the request, and reading the response. If both B<bio> and B<rbio> are given (which may be memory BIOs, for instance) |
