summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x509cset.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-08-19 13:39:57 +0200
committerDr. Stephen Henson <steve@openssl.org>2016-08-19 19:40:55 +0200
commit568ce3a583a17c33feacbf5028ece9f7f0680478 (patch)
treef55156e99147d3139ad974b7a9c44925982bf987 /crypto/x509/x509cset.c
parentAdd -dane_ee_no_namechecks s_client(1) option (diff)
downloadopenssl-568ce3a583a17c33feacbf5028ece9f7f0680478.tar.xz
openssl-568ce3a583a17c33feacbf5028ece9f7f0680478.zip
Constify certificate and CRL time routines.
Update certificate and CRL time routines to match new standard. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'crypto/x509/x509cset.c')
-rw-r--r--crypto/x509/x509cset.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/crypto/x509/x509cset.c b/crypto/x509/x509cset.c
index 681c43812a..205785961b 100644
--- a/crypto/x509/x509cset.c
+++ b/crypto/x509/x509cset.c
@@ -33,14 +33,14 @@ int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name)
return (X509_NAME_set(&x->crl.issuer, name));
}
-int X509_CRL_set_lastUpdate(X509_CRL *x, const ASN1_TIME *tm)
+int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm)
{
if (x == NULL)
return 0;
return x509_set1_time(&x->crl.lastUpdate, tm);
}
-int X509_CRL_set_nextUpdate(X509_CRL *x, const ASN1_TIME *tm)
+int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm)
{
if (x == NULL)
return 0;
@@ -80,16 +80,28 @@ long X509_CRL_get_version(const X509_CRL *crl)
return ASN1_INTEGER_get(crl->crl.version);
}
-ASN1_TIME *X509_CRL_get_lastUpdate(const X509_CRL *crl)
+const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl)
{
return crl->crl.lastUpdate;
}
-ASN1_TIME *X509_CRL_get_nextUpdate(const X509_CRL *crl)
+const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl)
{
return crl->crl.nextUpdate;
}
+#if OPENSSL_API_COMPAT < 0x10100000L
+ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl)
+{
+ return crl->crl.lastUpdate;
+}
+
+ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl)
+{
+ return crl->crl.nextUpdate;
+}
+#endif
+
X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl)
{
return crl->crl.issuer;