mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:57:44 +00:00
LibTLS: Also read out the Organisational Unit from the certificate
This needs to be read out if we want to actually verify the cert chain.
This commit is contained in:
parent
a2186fd64a
commit
1746e6f9ca
2 changed files with 5 additions and 0 deletions
|
@ -339,6 +339,8 @@ static ssize_t _parse_asn1(const Context& context, Certificate& cert, const u8*
|
|||
cert.issuer_entity = String { (const char*)buffer + position, length };
|
||||
} else if (_asn1_is_oid(oid, Constants::subject_oid)) {
|
||||
cert.issuer_subject = String { (const char*)buffer + position, length };
|
||||
} else if (_asn1_is_oid(oid, Constants::unit_oid)) {
|
||||
cert.issuer_unit = String { (const char*)buffer + position, length };
|
||||
}
|
||||
} else if (_asn1_is_field_present(fields, Constants::owner_id)) {
|
||||
if (_asn1_is_oid(oid, Constants::country_oid)) {
|
||||
|
@ -351,6 +353,8 @@ static ssize_t _parse_asn1(const Context& context, Certificate& cert, const u8*
|
|||
cert.entity = String { (const char*)buffer + position, length };
|
||||
} else if (_asn1_is_oid(oid, Constants::subject_oid)) {
|
||||
cert.subject = String { (const char*)buffer + position, length };
|
||||
} else if (_asn1_is_oid(oid, Constants::unit_oid)) {
|
||||
cert.unit = String { (const char*)buffer + position, length };
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue