Provide X509_get0_tbs_sigalg().
authorjsing <jsing@openbsd.org>
Thu, 22 Feb 2018 17:09:28 +0000 (17:09 +0000)
committerjsing <jsing@openbsd.org>
Thu, 22 Feb 2018 17:09:28 +0000 (17:09 +0000)
lib/libcrypto/Symbols.list
lib/libcrypto/x509/x509.h
lib/libcrypto/x509/x509_set.c

index c4daf0e..fe4c0d1 100644 (file)
@@ -2958,6 +2958,7 @@ X509_get0_notBefore
 X509_get0_pubkey
 X509_get0_pubkey_bitstr
 X509_get0_signature
+X509_get0_tbs_sigalg
 X509_get1_email
 X509_get1_ocsp
 X509_get_default_cert_area
index cfa08b4..92f012e 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509.h,v 1.39 2018/02/22 17:06:42 jsing Exp $ */
+/* $OpenBSD: x509.h,v 1.40 2018/02/22 17:09:28 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -979,7 +979,8 @@ int ASN1_item_sign_ctx(const ASN1_ITEM *it,
 #endif
 
 const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x);
-int            X509_set_version(X509 *x,long version);
+const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
+int            X509_set_version(X509 *x, long version);
 int            X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
 ASN1_INTEGER * X509_get_serialNumber(X509 *x);
 int            X509_set_issuer_name(X509 *x, X509_NAME *name);
index 06ff12c..becdaf6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x509_set.c,v 1.15 2018/02/22 17:06:42 jsing Exp $ */
+/* $OpenBSD: x509_set.c,v 1.16 2018/02/22 17:09:28 jsing Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -69,6 +69,12 @@ X509_get0_extensions(const X509 *x)
        return x->cert_info->extensions;
 }
 
+const X509_ALGOR *
+X509_get0_tbs_sigalg(const X509 *x)
+{
+       return x->cert_info->signature;
+}
+
 int
 X509_set_version(X509 *x, long version)
 {