[openssl-commits] [openssl] master update
Dr. Stephen Henson
steve at openssl.org
Thu Aug 18 11:00:21 UTC 2016
The branch master has been updated
via 604f6eff31a3837abd3d96a2a41a3b269df757c4 (commit)
from dd8e5a573272d369cb6dd21592e2b1b1d3941939 (commit)
- Log -----------------------------------------------------------------
commit 604f6eff31a3837abd3d96a2a41a3b269df757c4
Author: Matt Caswell <matt at openssl.org>
Date: Mon Aug 15 12:41:25 2016 +0100
Convert X509_REVOKED* functions to use const getters
Reviewed-by: Richard Levitte <levitte at openssl.org>
Reviewed-by: Stephen Henson <steve at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/f_int.c | 2 +-
crypto/x509/x509cset.c | 6 +++---
doc/crypto/X509V3_get_d2i.pod | 2 +-
doc/crypto/X509_CRL_get0_by_serial.pod | 4 ++--
include/openssl/asn1.h | 2 +-
include/openssl/x509.h | 7 ++++---
6 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/crypto/asn1/f_int.c b/crypto/asn1/f_int.c
index f1ed6bb..c203480 100644
--- a/crypto/asn1/f_int.c
+++ b/crypto/asn1/f_int.c
@@ -13,7 +13,7 @@
#include <openssl/buffer.h>
#include <openssl/asn1.h>
-int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a)
+int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a)
{
int i, n = 0;
static const char *h = "0123456789ABCDEF";
diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c
index e33caf7..fedb2c5 100644
--- a/crypto/x509/x509cset.c
+++ b/crypto/x509/x509cset.c
@@ -139,7 +139,7 @@ int X509_CRL_get_signature_nid(const X509_CRL *crl)
return OBJ_obj2nid(crl->sig_alg.algorithm);
}
-ASN1_TIME *X509_REVOKED_get0_revocationDate(X509_REVOKED *x)
+const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x)
{
return x->revocationDate;
}
@@ -161,7 +161,7 @@ int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm)
return (in != NULL);
}
-ASN1_INTEGER *X509_REVOKED_get0_serialNumber(X509_REVOKED *x)
+const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x)
{
return &x->serialNumber;
}
@@ -178,7 +178,7 @@ int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial)
return 1;
}
-STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *r)
+const STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *r)
{
return r->extensions;
}
diff --git a/doc/crypto/X509V3_get_d2i.pod b/doc/crypto/X509V3_get_d2i.pod
index 9375a8e..ac560b2 100644
--- a/doc/crypto/X509V3_get_d2i.pod
+++ b/doc/crypto/X509V3_get_d2i.pod
@@ -34,7 +34,7 @@ X509_REVOKED_add1_ext_i2d - X509 extension decode and encode functions
const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x);
const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl);
- STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *r);
+ const STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *r);
=head1 DESCRIPTION
diff --git a/doc/crypto/X509_CRL_get0_by_serial.pod b/doc/crypto/X509_CRL_get0_by_serial.pod
index add8490..d9d4360 100644
--- a/doc/crypto/X509_CRL_get0_by_serial.pod
+++ b/doc/crypto/X509_CRL_get0_by_serial.pod
@@ -18,8 +18,8 @@ functions
STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);
- ASN1_INTEGER *X509_REVOKED_get0_serialNumber(X509_REVOKED *r);
- ASN1_TIME *X509_REVOKED_get0_revocationDate(X509_REVOKED *r);
+ const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *r);
+ const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *r);
int X509_REVOKED_set_serialNumber(X509_REVOKED *r, ASN1_INTEGER *serial);
int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
diff --git a/include/openssl/asn1.h b/include/openssl/asn1.h
index d37a3fc..afd3b1c 100644
--- a/include/openssl/asn1.h
+++ b/include/openssl/asn1.h
@@ -629,7 +629,7 @@ ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZE
**out);
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);
-int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a);
+int i2a_ASN1_INTEGER(BIO *bp, const ASN1_INTEGER *a);
int a2i_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *bs, char *buf, int size);
int i2a_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *a);
int a2i_ASN1_ENUMERATED(BIO *bp, ASN1_ENUMERATED *bs, char *buf, int size);
diff --git a/include/openssl/x509.h b/include/openssl/x509.h
index 1a63ba5..48de4de 100644
--- a/include/openssl/x509.h
+++ b/include/openssl/x509.h
@@ -697,11 +697,12 @@ void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
int X509_CRL_get_signature_nid(const X509_CRL *crl);
int i2d_re_X509_CRL_tbs(X509_CRL *req, unsigned char **pp);
-ASN1_INTEGER *X509_REVOKED_get0_serialNumber(X509_REVOKED *x);
+const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x);
int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial);
-ASN1_TIME *X509_REVOKED_get0_revocationDate(X509_REVOKED *x);
+const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x);
int X509_REVOKED_set_revocationDate(X509_REVOKED *r, ASN1_TIME *tm);
-STACK_OF(X509_EXTENSION) *X509_REVOKED_get0_extensions(const X509_REVOKED *r);
+const STACK_OF(X509_EXTENSION) *
+X509_REVOKED_get0_extensions(const X509_REVOKED *r);
X509_CRL *X509_CRL_diff(X509_CRL *base, X509_CRL *newer,
EVP_PKEY *skey, const EVP_MD *md, unsigned int flags);
More information about the openssl-commits
mailing list