Latest update, add TLS 1.3 session time configuration.
This commit is contained in:
@@ -297,6 +297,9 @@ int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type,
|
||||
if (ctx == NULL)
|
||||
return 0;
|
||||
|
||||
stmp.type = X509_LU_NONE;
|
||||
stmp.data.ptr = NULL;
|
||||
|
||||
CRYPTO_THREAD_write_lock(ctx->lock);
|
||||
tmp = X509_OBJECT_retrieve_by_subject(ctx->objs, type, name);
|
||||
CRYPTO_THREAD_unlock(ctx->lock);
|
||||
|
||||
+4
-1
@@ -72,7 +72,10 @@ static int x509_verify_sm2(X509 *x, EVP_PKEY *pkey, int mdnid, int pknid)
|
||||
ret = 0;
|
||||
goto err;
|
||||
}
|
||||
if (EVP_PKEY_CTX_set1_id(pctx, x->sm2_id.data, x->sm2_id.length) != 1) {
|
||||
/* NOTE: we tolerate no actual ID, to provide maximum flexibility */
|
||||
if (x->sm2_id != NULL
|
||||
&& EVP_PKEY_CTX_set1_id(pctx, x->sm2_id->data,
|
||||
x->sm2_id->length) != 1) {
|
||||
X509err(X509_F_X509_VERIFY_SM2, ERR_R_EVP_LIB);
|
||||
ret = 0;
|
||||
goto err;
|
||||
|
||||
+10
-3
@@ -72,6 +72,9 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
|
||||
#ifndef OPENSSL_NO_RFC3779
|
||||
ret->rfc3779_addr = NULL;
|
||||
ret->rfc3779_asid = NULL;
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
ret->sm2_id = NULL;
|
||||
#endif
|
||||
ret->aux = NULL;
|
||||
ret->crldp = NULL;
|
||||
@@ -91,6 +94,9 @@ static int x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,
|
||||
#ifndef OPENSSL_NO_RFC3779
|
||||
sk_IPAddressFamily_pop_free(ret->rfc3779_addr, IPAddressFamily_free);
|
||||
ASIdentifiers_free(ret->rfc3779_asid);
|
||||
#endif
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
ASN1_OCTET_STRING_free(ret->sm2_id);
|
||||
#endif
|
||||
break;
|
||||
|
||||
@@ -246,13 +252,14 @@ int X509_get_signature_nid(const X509 *x)
|
||||
}
|
||||
|
||||
#ifndef OPENSSL_NO_SM2
|
||||
void X509_set_sm2_id(X509 *x, ASN1_OCTET_STRING *sm2_id)
|
||||
void X509_set0_sm2_id(X509 *x, ASN1_OCTET_STRING *sm2_id)
|
||||
{
|
||||
x->sm2_id = *sm2_id;
|
||||
ASN1_OCTET_STRING_free(x->sm2_id);
|
||||
x->sm2_id = sm2_id;
|
||||
}
|
||||
|
||||
ASN1_OCTET_STRING *X509_get0_sm2_id(X509 *x)
|
||||
{
|
||||
return &x->sm2_id;
|
||||
return x->sm2_id;
|
||||
}
|
||||
#endif
|
||||
Reference in New Issue
Block a user