From 16f8a618305ac1a806afdb38abf6cc55ee07c457 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 17 Oct 2019 16:06:15 -0400 Subject: Remove outdated info from man7/ssl There were two paragraphs of useful information about SSL_dup, so copy that to the right manpage. Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/10208) --- doc/man3/SSL_new.pod | 13 + doc/man7/ssl.pod | 681 --------------------------------------------------- 2 files changed, 13 insertions(+), 681 deletions(-) diff --git a/doc/man3/SSL_new.pod b/doc/man3/SSL_new.pod index 9ca9941f58..6dfe021ec7 100644 --- a/doc/man3/SSL_new.pod +++ b/doc/man3/SSL_new.pod @@ -32,6 +32,19 @@ settings are inherited from the original B structure. Dynamic data (i.e. existing connection details) are not copied, the new B is set into an initial accept (server) or connect (client) state. +SSL_dup() allows applications to configure an SSL handle for use in multiple +SSL connections, and then duplicate it prior to initiating each connection +with the duplicated handle. Use of SSL_dup() avoids the need to repeat +the configuration of the handles for each connection. + +For SSL_dup() to work, the connection MUST be in its initial state and +MUST NOT have not yet have started the SSL handshake. For connections +that are not in their initial state SSL_dup() just increments an internal +reference count and returns the I handle. It may be possible to +use L to recycle an SSL handle that is not in its initial +state for re-use, but this is best avoided. Instead, save and restore +the session, if desired, and construct a fresh handle for each connection. + =head1 RETURN VALUES The following return values can occur: diff --git a/doc/man7/ssl.pod b/doc/man7/ssl.pod index b53cdb2baf..ae40dac084 100644 --- a/doc/man7/ssl.pod +++ b/doc/man7/ssl.pod @@ -107,679 +107,6 @@ it's already included by ssl.h>. =back -=head1 API FUNCTIONS - -Currently the OpenSSL B library exports 214 API functions. -They are documented in the following: - -=head2 Dealing with Protocol Methods - -Here we document the various API functions which deal with the SSL/TLS -protocol methods defined in B structures. - -=over 4 - -=item const SSL_METHOD *B(void); - -Constructor for the I SSL_METHOD structure for clients, -servers or both. -See L for details. - -=item const SSL_METHOD *B(void); - -Constructor for the I SSL_METHOD structure for clients. -Must be used to support the TLSv1.3 protocol. - -=item const SSL_METHOD *B(void); - -Constructor for the I SSL_METHOD structure for servers. -Must be used to support the TLSv1.3 protocol. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1.2 SSL_METHOD structure for clients, servers or both. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1.2 SSL_METHOD structure for clients. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1.2 SSL_METHOD structure for servers. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1.1 SSL_METHOD structure for clients, servers or both. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1.1 SSL_METHOD structure for clients. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1.1 SSL_METHOD structure for servers. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1 SSL_METHOD structure for clients, servers or both. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1 SSL_METHOD structure for clients. - -=item const SSL_METHOD *B(void); - -Constructor for the TLSv1 SSL_METHOD structure for servers. - -=item const SSL_METHOD *B(void); - -Constructor for the SSLv3 SSL_METHOD structure for clients, servers or both. - -=item const SSL_METHOD *B(void); - -Constructor for the SSLv3 SSL_METHOD structure for clients. - -=item const SSL_METHOD *B(void); - -Constructor for the SSLv3 SSL_METHOD structure for servers. - -=back - -=head2 Dealing with Ciphers - -Here we document the various API functions which deal with the SSL/TLS -ciphers defined in B structures. - -=over 4 - -=item char *B(SSL_CIPHER *cipher, char *buf, int len); - -Write a string to I (with a maximum size of I) containing a human -readable description of I. Returns I. - -=item int B(SSL_CIPHER *cipher, int *alg_bits); - -Determine the number of bits in I. Because of export crippled ciphers -there are two bits: The bits the algorithm supports in general (stored to -I) and the bits which are actually used (the return value). - -=item const char *B(SSL_CIPHER *cipher); - -Return the internal name of I as a string. These are the various -strings defined by the I and I -definitions in the header files. - -=item const char *B(SSL_CIPHER *cipher); - -Returns a string like "C" or "C" which indicates the -SSL/TLS protocol version to which I belongs (i.e. where it was defined -in the specification the first time). - -=back - -=head2 Dealing with Protocol Contexts - -Here we document the various API functions which deal with the SSL/TLS -protocol context defined in the B structure. - -=over 4 - -=item int B(SSL_CTX *ctx, X509 *x); - -=item long B(SSL_CTX *ctx, X509 *x509); - -=item int B(SSL_CTX *ctx, SSL_SESSION *c); - -=item int B(const SSL_CTX *ctx); - -=item long B(SSL_CTX *ctx, int cmd, long larg, char *parg); - -=item void B(SSL_CTX *s, long t); - -=item void B(SSL_CTX *a); - -=item char *B(SSL_CTX *ctx); - -=item X509_STORE *B(SSL_CTX *ctx); - -=item STACK *B(const SSL_CTX *ctx); - -=item STACK *B(const SSL_CTX *ctx); - -=item int (*B(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey); - -=item void B(SSL_CTX *ctx); - -=item char *B(const SSL_CTX *s, int idx); - -=item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) - -=item long B(SSL_CTX *ctx, STACK_OF(X509) **sk); - -=item long B(SSL_CTX *ctx, STACK_OF(X509) **sk); - -=item void (*B(SSL_CTX *ctx))(SSL *ssl, int cb, int ret); - -=item int B(const SSL_CTX *ctx); - -=item void B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item long B(const SSL_CTX *ctx); - -=item int (*B(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx, const char *CAfile, const char *CApath); - -=item SSL_CTX *B(const SSL_METHOD *meth); - -=item int SSL_CTX_up_ref(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx, SSL_SESSION *c); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item SSL_SESSION *(*B(SSL_CTX *ctx))(SSL *ssl, unsigned char *data, int len, int *copy); - -=item int (*B(SSL_CTX *ctx)(SSL *ssl, SSL_SESSION *sess); - -=item void (*B(SSL_CTX *ctx)(SSL_CTX *ctx, SSL_SESSION *sess); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx); - -=item void B(SSL_CTX *ctx, t); - -=item void B(SSL_CTX *ctx, SSL_SESSION *(*cb)(SSL *ssl, unsigned char *data, int len, int *copy)); - -=item void B(SSL_CTX *ctx, int (*cb)(SSL *ssl, SSL_SESSION *sess)); - -=item void B(SSL_CTX *ctx, void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess)); - -=item int B(SSL_CTX *ctx); - -=item LHASH *B(SSL_CTX *ctx); - -=item int B(SSL_CTX *ctx, void *arg); - -=item void B(SSL_CTX *ctx, X509_STORE *cs); - -=item void B(SSL_CTX *ctx, X509_STORE *cs); - -=item void B(SSL_CTX *ctx, int (*cb)(), char *arg) - -=item int B(SSL_CTX *ctx, char *str); - -=item void B(SSL_CTX *ctx, STACK *list); - -=item void B(SSL_CTX *ctx, int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey)); - -=item int B(SSL_CTX *ctx, ssl_ct_validation_cb callback, void *arg); - -=item void B(SSL_CTX *ctx, int (*cb);(void)) - -=item void B(SSL_CTX *ctx, int m); - -=item int B(SSL_CTX *ctx); - -Use the default paths to locate trusted CA certificates. There is one default -directory path and one default file path. Both are set via this call. - -=item int B(SSL_CTX *ctx) - -Use the default directory path to locate trusted CA certificates. - -=item int B(SSL_CTX *ctx) - -Use the file path to locate trusted CA certificates. - -=item int B(SSL_CTX *s, int idx, char *arg); - -=item void B(SSL_CTX *ctx, void (*cb)(SSL *ssl, int cb, int ret)); - -=item void B(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); - -=item void B(SSL_CTX *ctx, void *arg); - -=item unsigned long B(SSL_CTX *ctx, unsigned long op); - -=item unsigned long B(SSL_CTX *ctx); - -=item unsigned long B(SSL_CTX *ctx, unsigned long op); - -=item void B(SSL_CTX *ctx, int mode); - -=item void B(SSL_CTX *ctx, int m); - -=item void B(SSL_CTX *ctx, int mode); - -=item int B(SSL_CTX *ctx, void *arg); - -=item int B(SSL_CTX *ctx, char *(*cb)(SSL *ssl, void *arg)); - -=item int B(SSL_CTX *ctx, char *password); - -=item int B(SSL_CTX *ctx, int strength); - -=item int B(SSL_CTX *ctx, char *name); - -=item int B(SSL_CTX *ctx, int (*cb)(SSL *ssl, int *ad, void *arg)); - -=item int B(SSL_CTX *ctx, int (*cb)(SSL *ssl, void *arg)); - -=item int B(SSL_CTX *ctx, const SSL_METHOD *meth); - -=item void B(SSL_CTX *ctx, long t); - -=item long B(SSL_CTX* ctx, DH *dh); - -=item long B(SSL_CTX *ctx, DH *(*cb)(void)); - -=item long B(SSL_CTX* ctx, const EC_KEY *ecdh); - -=item void B(SSL_CTX *ctx, int mode, int (*cb);(void)) - -=item int B(SSL_CTX *ctx, EVP_PKEY *pkey); - -=item int B(int type, SSL_CTX *ctx, unsigned char *d, long len); - -=item int B(SSL_CTX *ctx, const char *file, int type); - -=item int B(SSL_CTX *ctx, RSA *rsa); - -=item int B(SSL_CTX *ctx, unsigned char *d, long len); - -=item int B(SSL_CTX *ctx, const char *file, int type); - -=item int B(SSL_CTX *ctx, X509 *x); - -=item int B(SSL_CTX *ctx, int len, unsigned char *d); - -=item int B(SSL_CTX *ctx, const char *file, int type); - -=item int B(SSL_CTX *ctx, X509 *x, EVP_PKEY *pkey, STACK_OF(X509) *chain, int override); - -=item X509 *B(const SSL_CTX *ctx); - -=item EVP_PKEY *B(const SSL_CTX *ctx); - -=item void B(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)); - -=item int B(SSL_CTX *ctx, const char *hint); - -=item void B(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)); - - -=back - -=head2 Dealing with Sessions - -Here we document the various API functions which deal with the SSL/TLS -sessions defined in the B structures. - -=over 4 - -=item int B(const SSL_SESSION *a, const SSL_SESSION *b); - -=item void B(SSL_SESSION *ss); - -=item char *B(SSL_SESSION *s); - -=item char *B(const SSL_SESSION *s, int idx); - -=item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) - -=item long B(const SSL_SESSION *s); - -=item long B(const SSL_SESSION *s); - -=item unsigned long B(const SSL_SESSION *a); - -=item SSL_SESSION *B(void); - -=item int B(BIO *bp, const SSL_SESSION *x); - -=item int B(FILE *fp, const SSL_SESSION *x); - -=item int B(SSL_SESSION *s, char *a); - -=item int B(SSL_SESSION *s, int idx, char *arg); - -=item long B(SSL_SESSION *s, long t); - -=item long B(SSL_SESSION *s, long t); - -=back - -=head2 Dealing with Connections - -Here we document the various API functions which deal with the SSL/TLS -connection defined in the B structure. - -=over 4 - -=item int B(SSL *ssl); - -=item int B(STACK *stack, const char *dir); - -=item int B(STACK *stack, const char *file); - -=item int B(SSL *ssl, X509 *x); - -=item char *B(int value); - -=item char *B(int value); - -=item char *B(int value); - -=item char *B(int value); - -=item int B(const SSL *ssl); - -=item void B(SSL *ssl); - -=item long B(SSL *ssl); - -=item int B(SSL *ssl); - -=item int B(SSL *t, const SSL *f); - -Sets the session details for B to be the same as in B. Returns 1 on -success or 0 on failure. - -=item long B(SSL *ssl, int cmd, long larg, char *parg); - -=item int B(SSL *ssl); - -=item SSL *B(SSL *ssl); - -SSL_dup() allows applications to configure an SSL handle for use -in multiple SSL connections, and then duplicate it prior to initiating -each connection with the duplicated handle. -Use of SSL_dup() avoids the need to repeat the configuration of the -handles for each connection. - -For SSL_dup() to work, the connection MUST be in its initial state -and MUST NOT have not yet have started the SSL handshake. -For connections that are not in their initial state SSL_dup() just -increments an internal reference count and returns the I -handle. -It may be possible to use L to recycle an SSL handle -that is not in its initial state for re-use, but this is best -avoided. -Instead, save and restore the session, if desired, and construct a -fresh handle for each connection. - -=item STACK *B(STACK *sk); - -=item void B(SSL *ssl); - -=item SSL_CTX *B(const SSL *ssl); - -=item char *B(SSL *ssl); - -=item X509 *B(const SSL *ssl); - -=item const char *B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item int B(const SSL *ssl, int *alg_bits); - -=item char *B(const SSL *ssl, int n); - -=item char *B(const SSL *ssl); - -=item char *B(const SSL *ssl); - -=item STACK *B(const SSL *ssl); - -=item STACK *B(const SSL *ssl); - -=item SSL_CIPHER *B(SSL *ssl); - -=item long B(const SSL *ssl); - -=item int B(const SSL *ssl, int i); - -=item char *B(const SSL *ssl, int idx); - -=item int B(void); - -=item int B(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void)) - -=item int B(const SSL *ssl); - -=item void (*B(const SSL *ssl);)() - -=item int B(SSL *s); - -=item STACK *B(const SSL *ssl); - -=item X509 *B(const SSL *ssl); - -=item const STACK_OF(SCT) *B(SSL *s); - -=item EVP_PKEY *B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item BIO *B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item SSL_SESSION *B(const SSL *ssl); - -=item char *B(const SSL *ssl, char *buf, int size); - -=item int B(const SSL *ssl); - -=item BIGNUM *B(SSL *ssl); - -=item BIGNUM *B(SSL *ssl); - -=item char *B(SSL *ssl); - -=item char *B(SSL *ssl); - -=item const SSL_METHOD *B(SSL *ssl); - -=item int B(const SSL *ssl); - -=item long B(const SSL *ssl); - -=item long B(const SSL *ssl); - -=item int (*B(const SSL *ssl))(int, X509_STORE_CTX *) - -=item int B(const SSL *ssl); - -=item long B(const SSL *ssl); - -=item char *B(const SSL *ssl); - -=item BIO *B(const SSL *ssl); - -=item int B(SSL *ssl); - -=item int B(SSL *ssl); - -=item int B(SSL *ssl); - -=item int B(SSL *ssl); - -=item int B(SSL *ssl); - -=item int B(SSL *s, int updatetype); - -=item STACK *B(const char *file); - -=item SSL *B(SSL_CTX *ctx); - -=item int SSL_up_ref(SSL *s); - -=item long B(SSL *ssl); - -=item int B(SSL *ssl, void *buf, int num); - -=item int B(const SSL *ssl); - -=item int B(SSL *ssl, void *buf, int num); - -=item int B(SSL *ssl); - -=item char *B(SSL *ssl); - -=item char *B(SSL *ssl); - -=item long B(SSL *ssl); - -=item void B(SSL *ssl); - -=item void B(SSL *ssl, char *arg); - -=item void B(SSL *ssl, BIO *rbio, BIO *wbio); - -=item int B(SSL *ssl, char *str); - -=item void B(SSL *ssl, STACK *list); - -=item void B(SSL *ssl); - -=item int B(SSL *ssl, ssl_ct_validation_cb callback, void *arg); - -=item int B(SSL *ssl, int idx, char *arg); - -=item int B(SSL *ssl, int fd); - -=item void B(SSL *ssl, void (*cb);(void)) - -=item void B(SSL *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg)); - -=item void B(SSL *ctx, void *arg); - -=item unsigned long B(SSL *ssl, unsigned long op); - -=item unsigned long B(SSL *ssl); - -=item unsigned long B(SSL *ssl, unsigned long op); - -=item void B(SSL *ssl, int mode); - -=item void B(SSL *ssl, int yes); - -=item int B(SSL *ssl, int fd); - -=item int B(SSL *ssl, SSL_SESSION *session); - -=item void B(SSL *ssl, int mode); - -=item int B(SSL *ssl, const BIGNUM *N, const BIGNUM *g, BIGNUM *sa, BIGNUM *v, char *info); - -=item int B(SSL *ssl, const char *user, const char *pass, const char *grp); - -=item int B(SSL *ssl, const SSL_METHOD *meth); - -=item void B(SSL *ssl, long t); - -=item void B(SSL *ssl, long t); - -=item long B(SSL *ssl, DH *dh); - -=item long B(SSL *ssl, DH *(*cb)(void)); - -=item long B(SSL *ssl, const EC_KEY *ecdh); - -=item void B(SSL *ssl, int mode, int (*callback);(void)) - -=item void B(SSL *ssl, long arg); - -=item int B(SSL *ssl, int fd); - -=item int B(SSL *ssl); - -=item OSSL_HANDSHAKE_STATE B(const SSL *ssl); - -Returns the current handshake state. - -=item char *B(const SSL *ssl); - -=item char *B(const SSL *ssl); - -=item long B(SSL *ssl); - -=item int B(SSL *ssl, EVP_PKEY *pkey); - -=item int B(int type, SSL *ssl, unsigned char *d, long len); - -=item int B(SSL *ssl, const char *file, int type); - -=item int B(SSL *ssl, RSA *rsa); - -=item int B(SSL *ssl, unsigned char *d, long len); - -=item int B(SSL *ssl, const char *file, int type); - -=item int B(SSL *ssl, X509 *x); - -=item int B(SSL *ssl, int len, unsigned char *d); - -=item int B(SSL *ssl, const char *file, int type); - -=item int B(SSL *ssl, X509 *x, EVP_PKEY *pkey, STACK_OF(X509) *chain, int override); - -=item int B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item int B(const SSL *ssl); - -=item int B(SSL *ssl, const void *buf, int num); - -=item void B(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len)); - -=item int B(SSL *ssl, const char *hint); - -=item void B(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len)); - -=item const char *B(SSL *ssl); - -=item const char *B(SSL *ssl); - -=back - -=head1 RETURN VALUES - -See the individual manual pages for details. - =head1 SEE ALSO L, L, @@ -863,14 +190,6 @@ L, L, L -=head1 HISTORY - -B, B and B were removed -in OpenSSL 1.1.0. - -The return type of B was changed from void to int in -OpenSSL 1.1.0. - =head1 COPYRIGHT Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved. -- cgit v1.2.3