diff options
| author | tb <> | 2021-10-23 11:41:50 +0000 |
|---|---|---|
| committer | tb <> | 2021-10-23 11:41:50 +0000 |
| commit | 2f9f1d7545de6ade09ae69eb5f82e3a3716b0654 (patch) | |
| tree | 6e61b89bdfd567d7aca21d83f57d95efe18c300f /src/lib/libcrypto/asn1/x_sig.c | |
| parent | f525cb84f0c55c9c6bdb35916db7d304bae09213 (diff) | |
| download | openbsd-2f9f1d7545de6ade09ae69eb5f82e3a3716b0654.tar.gz openbsd-2f9f1d7545de6ade09ae69eb5f82e3a3716b0654.tar.bz2 openbsd-2f9f1d7545de6ade09ae69eb5f82e3a3716b0654.zip | |
Prepare to provide X509_SIG_get{0,m}.
ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/asn1/x_sig.c')
| -rw-r--r-- | src/lib/libcrypto/asn1/x_sig.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/x_sig.c b/src/lib/libcrypto/asn1/x_sig.c index 702bc40e55..dc3af45f6d 100644 --- a/src/lib/libcrypto/asn1/x_sig.c +++ b/src/lib/libcrypto/asn1/x_sig.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x_sig.c,v 1.11 2015/02/11 04:00:39 jsing Exp $ */ | 1 | /* $OpenBSD: x_sig.c,v 1.12 2021/10/23 11:41:50 tb Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -108,3 +108,22 @@ X509_SIG_free(X509_SIG *a) | |||
| 108 | { | 108 | { |
| 109 | ASN1_item_free((ASN1_VALUE *)a, &X509_SIG_it); | 109 | ASN1_item_free((ASN1_VALUE *)a, &X509_SIG_it); |
| 110 | } | 110 | } |
| 111 | |||
| 112 | void | ||
| 113 | X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, | ||
| 114 | const ASN1_OCTET_STRING **pdigest) | ||
| 115 | { | ||
| 116 | if (palg != NULL) | ||
| 117 | *palg = sig->algor; | ||
| 118 | if (pdigest != NULL) | ||
| 119 | *pdigest = sig->digest; | ||
| 120 | } | ||
| 121 | |||
| 122 | void | ||
| 123 | X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, ASN1_OCTET_STRING **pdigest) | ||
| 124 | { | ||
| 125 | if (palg != NULL) | ||
| 126 | *palg = sig->algor; | ||
| 127 | if (pdigest != NULL) | ||
| 128 | *pdigest = sig->digest; | ||
| 129 | } | ||
