提交 604f6eff 编写于 作者: M Matt Caswell 提交者: Dr. Stephen Henson

Convert X509_REVOKED* functions to use const getters

Reviewed-by: NRichard Levitte <levitte@openssl.org>
Reviewed-by: NStephen Henson <steve@openssl.org>
上级 dd8e5a57
......@@ -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";
......
......@@ -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;
}
......
......@@ -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
......
......@@ -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);
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册