diff options
author | jsing <> | 2018-02-17 15:50:42 +0000 |
---|---|---|
committer | jsing <> | 2018-02-17 15:50:42 +0000 |
commit | 03a712df0b3b84b1cbf608cae685e0abab3d4820 (patch) | |
tree | a1a8d00a0481732fb7c3778126076a12781f423c /src/lib/libcrypto/x509 | |
parent | 3a5371ec683ea0509dc8876c66b1132bc8eab086 (diff) | |
download | openbsd-03a712df0b3b84b1cbf608cae685e0abab3d4820.tar.gz openbsd-03a712df0b3b84b1cbf608cae685e0abab3d4820.tar.bz2 openbsd-03a712df0b3b84b1cbf608cae685e0abab3d4820.zip |
Provide X509_get0_extensions() and X509_get0_signature()
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/x509/x509.h | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/x509/x509_set.c | 8 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/libcrypto/x509/x509.h b/src/lib/libcrypto/x509/x509.h index 0cb9e2826a..6d6451171c 100644 --- a/src/lib/libcrypto/x509/x509.h +++ b/src/lib/libcrypto/x509/x509.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509.h,v 1.28 2018/02/14 16:57:25 jsing Exp $ */ | 1 | /* $OpenBSD: x509.h,v 1.29 2018/02/17 15:50:42 jsing 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 | * |
@@ -887,7 +887,8 @@ int X509_set_ex_data(X509 *r, int idx, void *arg); | |||
887 | void *X509_get_ex_data(X509 *r, int idx); | 887 | void *X509_get_ex_data(X509 *r, int idx); |
888 | int i2d_X509_AUX(X509 *a,unsigned char **pp); | 888 | int i2d_X509_AUX(X509 *a,unsigned char **pp); |
889 | X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); | 889 | X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); |
890 | 890 | void X509_get0_signature(const ASN1_BIT_STRING **psig, | |
891 | const X509_ALGOR **palg, const X509 *x); | ||
891 | int X509_get_signature_nid(const X509 *x); | 892 | int X509_get_signature_nid(const X509 *x); |
892 | 893 | ||
893 | int X509_alias_set1(X509 *x, unsigned char *name, int len); | 894 | int X509_alias_set1(X509 *x, unsigned char *name, int len); |
@@ -960,6 +961,7 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it, | |||
960 | ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx); | 961 | ASN1_BIT_STRING *signature, void *asn, EVP_MD_CTX *ctx); |
961 | #endif | 962 | #endif |
962 | 963 | ||
964 | const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x); | ||
963 | int X509_set_version(X509 *x,long version); | 965 | int X509_set_version(X509 *x,long version); |
964 | int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); | 966 | int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); |
965 | ASN1_INTEGER * X509_get_serialNumber(X509 *x); | 967 | ASN1_INTEGER * X509_get_serialNumber(X509 *x); |
diff --git a/src/lib/libcrypto/x509/x509_set.c b/src/lib/libcrypto/x509/x509_set.c index e60d6f967a..a43f009930 100644 --- a/src/lib/libcrypto/x509/x509_set.c +++ b/src/lib/libcrypto/x509/x509_set.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: x509_set.c,v 1.13 2018/02/14 16:57:25 jsing Exp $ */ | 1 | /* $OpenBSD: x509_set.c,v 1.14 2018/02/17 15:50:42 jsing 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 | * |
@@ -63,6 +63,12 @@ | |||
63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
64 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
65 | 65 | ||
66 | const STACK_OF(X509_EXTENSION) * | ||
67 | X509_get0_extensions(const X509 *x) | ||
68 | { | ||
69 | return x->cert_info->extensions; | ||
70 | } | ||
71 | |||
66 | int | 72 | int |
67 | X509_set_version(X509 *x, long version) | 73 | X509_set_version(X509 *x, long version) |
68 | { | 74 | { |