mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Adding some comments for easier understand
Signed-off-by: toth92g <toth92g@gmail.com>
This commit is contained in:
@ -756,17 +756,22 @@ static int x509_get_authority_key_id(unsigned char **p,
|
|||||||
} else {
|
} else {
|
||||||
authority_key_id->keyIdentifier.len = len;
|
authority_key_id->keyIdentifier.len = len;
|
||||||
authority_key_id->keyIdentifier.p = *p;
|
authority_key_id->keyIdentifier.p = *p;
|
||||||
|
/* Setting tag of the keyIdentfier intentionally to 0x04.
|
||||||
|
* Although the .keyIdentfier field is CONTEXT_SPECIFIC ([0] OPTIONAL),
|
||||||
|
* its tag with the content is the payload of on OCTET STRING primitive */
|
||||||
authority_key_id->keyIdentifier.tag = MBEDTLS_ASN1_OCTET_STRING;
|
authority_key_id->keyIdentifier.tag = MBEDTLS_ASN1_OCTET_STRING;
|
||||||
|
|
||||||
*p += len;
|
*p += len;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*p < end) {
|
if (*p < end) {
|
||||||
|
/* Getting authorityCertIssuer using the required specific class tag [1] */
|
||||||
if ((ret = mbedtls_asn1_get_tag(p, end, &len,
|
if ((ret = mbedtls_asn1_get_tag(p, end, &len,
|
||||||
MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED |
|
MBEDTLS_ASN1_CONTEXT_SPECIFIC | MBEDTLS_ASN1_CONSTRUCTED |
|
||||||
1)) != 0) {
|
1)) != 0) {
|
||||||
/* authorityCertIssuer is an OPTIONAL field */
|
/* authorityCertIssuer is an OPTIONAL field */
|
||||||
} else {
|
} else {
|
||||||
|
/* Getting directoryName using the required specific class tag [4] */
|
||||||
if ((ret = mbedtls_asn1_get_tag(p, end, &len,
|
if ((ret = mbedtls_asn1_get_tag(p, end, &len,
|
||||||
MBEDTLS_ASN1_CONTEXT_SPECIFIC |
|
MBEDTLS_ASN1_CONTEXT_SPECIFIC |
|
||||||
MBEDTLS_ASN1_CONSTRUCTED | 4)) != 0) {
|
MBEDTLS_ASN1_CONSTRUCTED | 4)) != 0) {
|
||||||
|
Reference in New Issue
Block a user