summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/x509
diff options
context:
space:
mode:
authorjsing <>2018-02-17 15:50:42 +0000
committerjsing <>2018-02-17 15:50:42 +0000
commit03a712df0b3b84b1cbf608cae685e0abab3d4820 (patch)
treea1a8d00a0481732fb7c3778126076a12781f423c /src/lib/libcrypto/x509
parent3a5371ec683ea0509dc8876c66b1132bc8eab086 (diff)
downloadopenbsd-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.h6
-rw-r--r--src/lib/libcrypto/x509/x509_set.c8
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);
887void *X509_get_ex_data(X509 *r, int idx); 887void *X509_get_ex_data(X509 *r, int idx);
888int i2d_X509_AUX(X509 *a,unsigned char **pp); 888int i2d_X509_AUX(X509 *a,unsigned char **pp);
889X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length); 889X509 * d2i_X509_AUX(X509 **a,const unsigned char **pp,long length);
890 890void X509_get0_signature(const ASN1_BIT_STRING **psig,
891 const X509_ALGOR **palg, const X509 *x);
891int X509_get_signature_nid(const X509 *x); 892int X509_get_signature_nid(const X509 *x);
892 893
893int X509_alias_set1(X509 *x, unsigned char *name, int len); 894int 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
964const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x);
963int X509_set_version(X509 *x,long version); 965int X509_set_version(X509 *x,long version);
964int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial); 966int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
965ASN1_INTEGER * X509_get_serialNumber(X509 *x); 967ASN1_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
66const STACK_OF(X509_EXTENSION) *
67X509_get0_extensions(const X509 *x)
68{
69 return x->cert_info->extensions;
70}
71
66int 72int
67X509_set_version(X509 *x, long version) 73X509_set_version(X509 *x, long version)
68{ 74{