diff options
author | Dirk-Willem van Gulik <dirkx@webweaving.org> | 2020-01-10 18:35:49 +0100 |
---|---|---|
committer | Tomas Mraz <tmraz@fedoraproject.org> | 2020-04-21 17:12:32 +0200 |
commit | 4738d9e060eccdb01d443c3cefe8101cbf1d4bfa (patch) | |
tree | 271a6116a60282d7ad6acd506e2b8848d9bf4e1e /doc/man3 | |
parent | 49d391d03c11352eeadec7df39c48d1c83fb164e (diff) |
Add setter equivalents to X509_REQ_get0_signature
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/10563)
(cherry picked from commit c72e59349f50ee00a1bf8605ada17dfccb8b3b1a)
Diffstat (limited to 'doc/man3')
-rw-r--r-- | doc/man3/X509_ALGOR_dup.pod | 12 | ||||
-rw-r--r-- | doc/man3/X509_get0_signature.pod | 20 |
2 files changed, 26 insertions, 6 deletions
diff --git a/doc/man3/X509_ALGOR_dup.pod b/doc/man3/X509_ALGOR_dup.pod index 4aeaa591eb..6612354508 100644 --- a/doc/man3/X509_ALGOR_dup.pod +++ b/doc/man3/X509_ALGOR_dup.pod @@ -2,7 +2,7 @@ =head1 NAME -X509_ALGOR_dup, X509_ALGOR_set0, X509_ALGOR_get0, X509_ALGOR_set_md, X509_ALGOR_cmp - AlgorithmIdentifier functions +X509_ALGOR_dup, X509_ALGOR_set0, X509_ALGOR_get0, X509_ALGOR_set_md, X509_ALGOR_cmp, X509_ALGOR_copy - AlgorithmIdentifier functions =head1 SYNOPSIS @@ -14,6 +14,7 @@ X509_ALGOR_dup, X509_ALGOR_set0, X509_ALGOR_get0, X509_ALGOR_set_md, X509_ALGOR_ const void **ppval, const X509_ALGOR *alg); void X509_ALGOR_set_md(X509_ALGOR *alg, const EVP_MD *md); int X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b); + int X509_ALGOR_copy(X509_ALGOR *dest, const X509_ALGOR *src); =head1 DESCRIPTION @@ -36,18 +37,25 @@ values for the message digest B<md>. X509_ALGOR_cmp() compares B<a> and B<b> and returns 0 if they have identical encodings and non-zero otherwise. +X509_ALGOR_copy() copies the source values into the dest structs; making +a duplicate of each (and free any thing pointed to from within *dest). + =head1 RETURN VALUES X509_ALGOR_dup() returns a valid B<X509_ALGOR> structure or NULL if an error occurred. -X509_ALGOR_set0() returns 1 on success or 0 on error. +X509_ALGOR_set0() and X509_ALGOR_copy() return 1 on success or 0 on error. X509_ALGOR_get0() and X509_ALGOR_set_md() return no values. X509_ALGOR_cmp() returns 0 if the two parameters have identical encodings and non-zero otherwise. +=head1 HISTORY + +The X509_ALGOR_copy() was added in 1.1.1e. + =head1 COPYRIGHT Copyright 2002-2018 The OpenSSL Project Authors. All Rights Reserved. diff --git a/doc/man3/X509_get0_signature.pod b/doc/man3/X509_get0_signature.pod index 4133bc37a9..2fe2fef61b 100644 --- a/doc/man3/X509_get0_signature.pod +++ b/doc/man3/X509_get0_signature.pod @@ -2,10 +2,10 @@ =head1 NAME -X509_get0_signature, X509_get_signature_nid, X509_get0_tbs_sigalg, -X509_REQ_get0_signature, X509_REQ_get_signature_nid, X509_CRL_get0_signature, -X509_CRL_get_signature_nid, X509_get_signature_info, X509_SIG_INFO_get, -X509_SIG_INFO_set - signature information +X509_get0_signature, X509_REQ_set0_signature, X509_REQ_set1_signature_algo, +X509_get_signature_nid, X509_get0_tbs_sigalg, X509_REQ_get0_signature, +X509_REQ_get_signature_nid, X509_CRL_get0_signature, X509_CRL_get_signature_nid, +X509_get_signature_info, X509_SIG_INFO_get, X509_SIG_INFO_set - signature information =head1 SYNOPSIS @@ -14,6 +14,8 @@ X509_SIG_INFO_set - signature information void X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg, const X509 *x); + void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig); + int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg); int X509_get_signature_nid(const X509 *x); const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x); @@ -41,6 +43,9 @@ X509_get0_signature() sets B<*psig> to the signature of B<x> and B<*palg> to the signature algorithm of B<x>. The values returned are internal pointers which B<MUST NOT> be freed up after the call. +X509_set0_signature() and X509_REQ_set1_signature_algo() are the +equivalent setters for the two values of X509_get0_signature(). + X509_get0_tbs_sigalg() returns the signature algorithm in the signed portion of B<x>. @@ -88,6 +93,10 @@ X509_get_signature_info() returns 1 if the signature information returned is valid or 0 if the information is not available (e.g. unknown algorithms or malformed parameters). +X509_REQ_set1_signature_algo() returns 0 on success; or 1 on an +error (e.g. null ALGO pointer). X509_REQ_set0_signature does +not return an error value. + =head1 SEE ALSO L<d2i_X509(3)>, @@ -118,6 +127,9 @@ X509_REQ_get0_signature(), X509_REQ_get_signature_nid(), X509_CRL_get0_signature() and X509_CRL_get_signature_nid() were added in OpenSSL 1.1.0. +The X509_REQ_set0_signature() and X509_REQ_set1_signature_algo() +were added in OpenSSL 1.1.1e. + =head1 COPYRIGHT Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. |