From 35cb565a9b3bb198d286e9e07897af8e774cb0b4 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Thu, 19 Nov 2015 15:49:30 -0500 Subject: [PATCH] Turn B<...()> into ...() For all functions, consistently use asdf() not B Reviewed-by: Kurt Roeckx --- doc/apps/config.pod | 4 +- doc/apps/dsaparam.pod | 2 +- doc/apps/ecparam.pod | 2 +- doc/crypto/CMS_sign.pod | 2 +- doc/crypto/CRYPTO_set_ex_data.pod | 14 +++---- doc/crypto/PKCS7_sign.pod | 2 +- doc/crypto/RSA_get_ex_new_index.pod | 48 +++++++++++----------- doc/crypto/SMIME_write_PKCS7.pod | 2 +- doc/crypto/X509_VERIFY_PARAM_set_flags.pod | 2 +- doc/crypto/d2i_X509.pod | 10 ++--- doc/ssl/SSL_CTX_set_cert_cb.pod | 4 +- doc/ssl/SSL_CTX_set_client_cert_cb.pod | 4 +- 12 files changed, 48 insertions(+), 48 deletions(-) diff --git a/doc/apps/config.pod b/doc/apps/config.pod index e238e1512..9547bc53b 100644 --- a/doc/apps/config.pod +++ b/doc/apps/config.pod @@ -47,7 +47,7 @@ or B<${section::name}>. By using the form B<$ENV::name> environment variables can be substituted. It is also possible to assign values to environment variables by using the name B, this will work if the program looks up environment variables using the B library -instead of calling B directly. +instead of calling getenv() directly. It is possible to escape certain characters by using any kind of quote or the B<\> character. By making the last character of a line a B<\> @@ -165,7 +165,7 @@ then an attempt will be made to initialize the ENGINE after all commands in its section have been processed. The command B sets the default algorithms an ENGINE will -supply using the functions B +supply using the functions ENGINE_set_default_string(). If the name matches none of the above command names it is assumed to be a ctrl command which is sent to the ENGINE. The value of the command is the diff --git a/doc/apps/dsaparam.pod b/doc/apps/dsaparam.pod index 1933857b6..0ac560a14 100644 --- a/doc/apps/dsaparam.pod +++ b/doc/apps/dsaparam.pod @@ -62,7 +62,7 @@ this option prints out the DSA parameters in human readable form. =item B<-C> this option converts the parameters into C code. The parameters can then -be loaded by calling the B function. +be loaded by calling the get_dsaXXX() function. =item B<-genkey> diff --git a/doc/apps/ecparam.pod b/doc/apps/ecparam.pod index 56962abe3..12a48ca83 100644 --- a/doc/apps/ecparam.pod +++ b/doc/apps/ecparam.pod @@ -66,7 +66,7 @@ This option prints out the EC parameters in human readable form. =item B<-C> This option converts the EC parameters into C code. The parameters can then -be loaded by calling the B function. +be loaded by calling the get_ec_group_XXX() function. =item B<-check> diff --git a/doc/crypto/CMS_sign.pod b/doc/crypto/CMS_sign.pod index 108b13e5e..39229fd5b 100644 --- a/doc/crypto/CMS_sign.pod +++ b/doc/crypto/CMS_sign.pod @@ -95,7 +95,7 @@ suitable for many purposes. For finer control of the output format the B, B and B parameters can all be B and the B flag set. Then one or more signers can be added using the function CMS_sign_add1_signer(), non default digests can be used and custom -attributes added. B must then be called to finalize the +attributes added. CMS_final() must then be called to finalize the structure if streaming is not enabled. =head1 BUGS diff --git a/doc/crypto/CRYPTO_set_ex_data.pod b/doc/crypto/CRYPTO_set_ex_data.pod index 9ba3fb7f9..68ac6fa1c 100644 --- a/doc/crypto/CRYPTO_set_ex_data.pod +++ b/doc/crypto/CRYPTO_set_ex_data.pod @@ -19,22 +19,22 @@ These functions are used internally by OpenSSL to manipulate application specific data attached to a specific structure. These functions should only be used by applications to manipulate -B structures passed to the B, B and -B callbacks: as passed to B for example. +B structures passed to the new_func(), free_func() and +dup_func() callbacks: as passed to RSA_get_ex_new_index() for example. -B is used to set application specific data, the data is +CRYPTO_set_ex_data() is used to set application specific data, the data is supplied in the B parameter and its precise meaning is up to the application. -B is used to retrieve application specific data. The data +CRYPTO_get_ex_data() is used to retrieve application specific data. The data is returned to the application, this will be the same value as supplied to -a previous B call. +a previous CRYPTO_set_ex_data() call. =head1 RETURN VALUES -B returns 1 on success or 0 on failure. +CRYPTO_set_ex_data() returns 1 on success or 0 on failure. -B returns the application data or 0 on failure. 0 may also +CRYPTO_get_ex_data() returns the application data or 0 on failure. 0 may also be valid application data but currently it can only fail if given an invalid B parameter. diff --git a/doc/crypto/PKCS7_sign.pod b/doc/crypto/PKCS7_sign.pod index 07d4dc4e6..2593ed19e 100644 --- a/doc/crypto/PKCS7_sign.pod +++ b/doc/crypto/PKCS7_sign.pod @@ -82,7 +82,7 @@ algorithm. This is B for both RSA and DSA keys. The B, B and B parameters can all be B if the B flag is set. One or more signers can be added -using the function B. B must also be +using the function PKCS7_sign_add_signer(). PKCS7_final() must also be called to finalize the structure if streaming is not enabled. Alternative signing digests can also be specified using this method. diff --git a/doc/crypto/RSA_get_ex_new_index.pod b/doc/crypto/RSA_get_ex_new_index.pod index a0f675077..7022459f1 100644 --- a/doc/crypto/RSA_get_ex_new_index.pod +++ b/doc/crypto/RSA_get_ex_new_index.pod @@ -34,78 +34,78 @@ additional data (for example a handle to the data in an external library). Since the application data can be anything at all it is passed and retrieved as a B type. -The B function is initially called to "register" some +The RSA_get_ex_new_index() function is initially called to "register" some new application specific data. It takes three optional function pointers which are called when the parent structure (in this case an RSA structure) is initially created, when it is copied and when it is freed up. If any or all of these function pointer arguments are not used they should be set to NULL. The precise manner in which these function pointers are called is described in more -detail below. B also takes additional long and pointer +detail below. RSA_get_ex_new_index() also takes additional long and pointer parameters which will be passed to the supplied functions but which otherwise have no special meaning. It returns an B which should be stored (typically in a static variable) and passed used in the B parameter in -the remaining functions. Each successful call to B +the remaining functions. Each successful call to RSA_get_ex_new_index() will return an index greater than any previously returned, this is important because the optional functions are called in order of increasing index value. -B is used to set application specific data, the data is +RSA_set_ex_data() is used to set application specific data, the data is supplied in the B parameter and its precise meaning is up to the application. -B is used to retrieve application specific data. The data +RSA_get_ex_data() is used to retrieve application specific data. The data is returned to the application, this will be the same value as supplied to -a previous B call. +a previous RSA_set_ex_data() call. -B is called when a structure is initially allocated (for example -with B. The parent structure members will not have any meaningful +new_func() is called when a structure is initially allocated (for example +with RSA_new(). The parent structure members will not have any meaningful values at this point. This function will typically be used to allocate any application specific structure. -B is called when a structure is being freed up. The dynamic parent +free_func() is called when a structure is being freed up. The dynamic parent structure members should not be accessed because they will be freed up when this function is called. -B and B take the same parameters. B is a +new_func() and free_func() take the same parameters. B is a pointer to the parent RSA structure. B is a the application specific data -(this wont be of much use in B. B is a pointer to the +(this wont be of much use in new_func(). B is a pointer to the B structure from the parent RSA structure: the functions -B and B can be called to manipulate +CRYPTO_get_ex_data() and CRYPTO_set_ex_data() can be called to manipulate it. The B parameter is the index: this will be the same value returned by -B when the functions were initially registered. Finally +RSA_get_ex_new_index() when the functions were initially registered. Finally the B and B parameters are the values originally passed to the same -corresponding parameters when B was called. +corresponding parameters when RSA_get_ex_new_index() was called. -B is called when a structure is being copied. Pointers to the +dup_func() is called when a structure is being copied. Pointers to the destination and source B structures are passed in the B and B parameters respectively. The B parameter is passed a pointer to the source application data when the function is called, when the function returns the value is copied to the destination: the application can thus modify the data pointed to by B and have different values in the source and destination. -The B, B and B parameters are the same as those in B -and B. +The B, B and B parameters are the same as those in new_func() +and free_func(). =head1 RETURN VALUES -B returns a new index or -1 on failure (note 0 is a valid +RSA_get_ex_new_index() returns a new index or -1 on failure (note 0 is a valid index value). -B returns 1 on success or 0 on failure. +RSA_set_ex_data() returns 1 on success or 0 on failure. -B returns the application data or 0 on failure. 0 may also +RSA_get_ex_data() returns the application data or 0 on failure. 0 may also be valid application data but currently it can only fail if given an invalid B parameter. -B and B should return 0 for failure and 1 for success. +new_func() and dup_func() should return 0 for failure and 1 for success. On failure an error code can be obtained from L. =head1 BUGS -B is currently never called. +dup_func() is currently never called. -The return value of B is ignored. +The return value of new_func() is ignored. -The B function isn't very useful because no meaningful values are +The new_func() function isn't very useful because no meaningful values are present in the parent RSA structure when it is called. =head1 SEE ALSO diff --git a/doc/crypto/SMIME_write_PKCS7.pod b/doc/crypto/SMIME_write_PKCS7.pod index 3ba3fe64a..6e272cfde 100644 --- a/doc/crypto/SMIME_write_PKCS7.pod +++ b/doc/crypto/SMIME_write_PKCS7.pod @@ -33,7 +33,7 @@ is also set. If the B flag is set streaming is performed. This flag should only be set if B was also set in the previous call to -PKCS7_sign() or B. +PKCS7_sign() or PKCS7_encrypt(). If cleartext signing is being used and B not set then the data must be read twice: once to compute the signature in PKCS7_sign() diff --git a/doc/crypto/X509_VERIFY_PARAM_set_flags.pod b/doc/crypto/X509_VERIFY_PARAM_set_flags.pod index 166e316a1..df5766cde 100644 --- a/doc/crypto/X509_VERIFY_PARAM_set_flags.pod +++ b/doc/crypto/X509_VERIFY_PARAM_set_flags.pod @@ -82,7 +82,7 @@ is NUL-terminated, B may be zero, otherwise B must be set to the length of B. When a hostname is specified, certificate verification automatically invokes L with flags equal to the B argument given to -B (default zero). Applications +X509_VERIFY_PARAM_set_hostflags() (default zero). Applications are strongly advised to use this interface in preference to explicitly calling L, hostname checks are out of scope with the DANE-EE(3) certificate usage, and the internal check will diff --git a/doc/crypto/d2i_X509.pod b/doc/crypto/d2i_X509.pod index 435ca1fa6..3cd2509d8 100644 --- a/doc/crypto/d2i_X509.pod +++ b/doc/crypto/d2i_X509.pod @@ -82,7 +82,7 @@ empty structure such as that returned by X509_new(). The encoded data is in binary form and may contain embedded zeroes. Therefore any FILE pointers or BIOs should be opened in binary mode. -Functions such as B will B return the correct length +Functions such as strlen() will B return the correct length of the encoded structure. The ways that B<*in> and B<*out> are incremented after the operation @@ -151,17 +151,17 @@ mistake is to attempt to use a buffer directly as follows: This code will result in B apparently containing garbage because it was incremented after the call to point after the data just written. -Also B will no longer contain the pointer allocated by B -and the subsequent call to B may well crash. +Also B will no longer contain the pointer allocated by OPENSSL_malloc() +and the subsequent call to OPENSSL_free() may well crash. -Another trap to avoid is misuse of the B argument to B: +Another trap to avoid is misuse of the B argument to d2i_X509(): X509 *x; if (!d2i_X509(&x, &p, len)) /* Some error */ -This will probably crash somewhere in B. The reason for this +This will probably crash somewhere in d2i_X509(). The reason for this is that the variable B is uninitialized and an attempt will be made to interpret its (invalid) value as an B structure, typically causing a segmentation violation. If B is set to NULL first then this will not diff --git a/doc/ssl/SSL_CTX_set_cert_cb.pod b/doc/ssl/SSL_CTX_set_cert_cb.pod index 77fdb95a6..915290704 100644 --- a/doc/ssl/SSL_CTX_set_cert_cb.pod +++ b/doc/ssl/SSL_CTX_set_cert_cb.pod @@ -15,10 +15,10 @@ SSL_CTX_set_cert_cb, SSL_set_cert_cb - handle certificate callback function =head1 DESCRIPTION -SSL_CTX_set_cert_cb() and SSL_set_cert_cb() sets the B callback, +SSL_CTX_set_cert_cb() and SSL_set_cert_cb() sets the cert_cb() callback, B value is pointer which is passed to the application callback. -When B is NULL, no callback function is used. +When cert_cb() is NULL, no callback function is used. cert_cb() is the application defined callback. It is called before a certificate will be used by a client or server. The callback can then inspect diff --git a/doc/ssl/SSL_CTX_set_client_cert_cb.pod b/doc/ssl/SSL_CTX_set_client_cert_cb.pod index 1b5f5f1a8..45cef7598 100644 --- a/doc/ssl/SSL_CTX_set_client_cert_cb.pod +++ b/doc/ssl/SSL_CTX_set_client_cert_cb.pod @@ -14,11 +14,11 @@ SSL_CTX_set_client_cert_cb, SSL_CTX_get_client_cert_cb - handle client certifica =head1 DESCRIPTION -SSL_CTX_set_client_cert_cb() sets the B callback, that is +SSL_CTX_set_client_cert_cb() sets the client_cert_cb() callback, that is called when a client certificate is requested by a server and no certificate was yet set for the SSL object. -When B is NULL, no callback function is used. +When client_cert_cb() is NULL, no callback function is used. SSL_CTX_get_client_cert_cb() returns a pointer to the currently set callback function.