Add X509_NAME_get0_der from OpenSSL 1.1.0.
Change-Id: Iaa616a09f944ce720c11236b031d0fa9deb47db3 Reviewed-on: https://boringssl-review.googlesource.com/23864 Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
parent
d8dbde79f9
commit
2bc937068d
@ -539,3 +539,16 @@ int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne)
|
|||||||
{
|
{
|
||||||
return ne->set;
|
return ne->set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder,
|
||||||
|
size_t *pderlen)
|
||||||
|
{
|
||||||
|
/* Make sure encoding is valid */
|
||||||
|
if (i2d_X509_NAME(nm, NULL) <= 0)
|
||||||
|
return 0;
|
||||||
|
if (pder != NULL)
|
||||||
|
*pder = (unsigned char *)nm->bytes->data;
|
||||||
|
if (pderlen != NULL)
|
||||||
|
*pderlen = nm->bytes->length;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
@ -690,6 +690,9 @@ OPENSSL_EXPORT X509_NAME *X509_NAME_dup(X509_NAME *xn);
|
|||||||
OPENSSL_EXPORT X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
|
OPENSSL_EXPORT X509_NAME_ENTRY *X509_NAME_ENTRY_dup(X509_NAME_ENTRY *ne);
|
||||||
OPENSSL_EXPORT int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne);
|
OPENSSL_EXPORT int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne);
|
||||||
|
|
||||||
|
OPENSSL_EXPORT int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder,
|
||||||
|
size_t *pderlen);
|
||||||
|
|
||||||
OPENSSL_EXPORT int X509_cmp_time(const ASN1_TIME *s, time_t *t);
|
OPENSSL_EXPORT int X509_cmp_time(const ASN1_TIME *s, time_t *t);
|
||||||
OPENSSL_EXPORT int X509_cmp_current_time(const ASN1_TIME *s);
|
OPENSSL_EXPORT int X509_cmp_current_time(const ASN1_TIME *s);
|
||||||
OPENSSL_EXPORT ASN1_TIME * X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
|
OPENSSL_EXPORT ASN1_TIME * X509_time_adj(ASN1_TIME *s, long adj, time_t *t);
|
||||||
|
Loading…
Reference in New Issue
Block a user