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 16:52:50 +0200 |
commit | c72e59349f50ee00a1bf8605ada17dfccb8b3b1a (patch) | |
tree | 8fa18de7b65e1ec688b91731bc8185c651896228 /crypto/x509 | |
parent | 1269a9a1d1d4ef9051a0965ba2b6ac850460531e (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)
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_req.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crypto/x509/x509_req.c b/crypto/x509/x509_req.c index 9382f37a8a..9e846d5948 100644 --- a/crypto/x509/x509_req.c +++ b/crypto/x509/x509_req.c @@ -286,6 +286,18 @@ void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, *palg = &req->sig_alg; } +void X509_REQ_set0_signature(X509_REQ *req, ASN1_BIT_STRING *psig) +{ + if (req->signature) + ASN1_BIT_STRING_free(req->signature); + req->signature = psig; +} + +int X509_REQ_set1_signature_algo(X509_REQ *req, X509_ALGOR *palg) +{ + return X509_ALGOR_copy(&req->sig_alg, palg); +} + int X509_REQ_get_signature_nid(const X509_REQ *req) { return OBJ_obj2nid(req->sig_alg.algorithm); |