mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-28 00:21:48 +03:00
Add raw public key buffer bounds to mbedtls_x509_crt struct
This commit adds an ASN.1 buffer field `pk_raw` to `mbedtls_x509_crt` which stores the bounds of the raw public key data within an X.509 CRT. This will be useful in subsequent commits to extract the peer's public key from its certificate chain.
This commit is contained in:
@ -996,11 +996,13 @@ static int x509_crt_parse_der_core( mbedtls_x509_crt *crt,
|
||||
/*
|
||||
* SubjectPublicKeyInfo
|
||||
*/
|
||||
crt->pk_raw.p = p;
|
||||
if( ( ret = mbedtls_pk_parse_subpubkey( &p, end, &crt->pk ) ) != 0 )
|
||||
{
|
||||
mbedtls_x509_crt_free( crt );
|
||||
return( ret );
|
||||
}
|
||||
crt->pk_raw.len = p - crt->pk_raw.p;
|
||||
|
||||
/*
|
||||
* issuerUniqueID [1] IMPLICIT UniqueIdentifier OPTIONAL,
|
||||
|
Reference in New Issue
Block a user