Fix some issues in comments

This commit is contained in:
Manuel Pégourié-Gonnard 2018-03-06 10:34:11 +01:00
parent 9a37e0f3be
commit 35eb39a924

View file

@ -1895,11 +1895,11 @@ static int x509_crt_check_parent( const mbedtls_x509_crt *child,
} }
/* /*
* Verify a certificate no parent inside the chain * Verify a certificate with no parent inside the chain
* (either the parent is a trusted root, or there is no parent) * (either the parent is a trusted root, or there is no parent)
* *
* See comments for mbedtls_x509_crt_verify_with_profile() * See comments for mbedtls_x509_crt_verify_with_profile()
* (also for notation used belowe) * (also for notation used below)
* *
* This function is called in two cases: * This function is called in two cases:
* - child was found to have a parent in trusted roots, in which case we're * - child was found to have a parent in trusted roots, in which case we're
@ -2218,7 +2218,7 @@ int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt,
* *
* There are five main cases to consider. Let's introduce some notation: * There are five main cases to consider. Let's introduce some notation:
* - E means the end-entity certificate * - E means the end-entity certificate
* - I and intermediate CA * - I an intermediate CA
* - R the trusted root CA this chain anchors to * - R the trusted root CA this chain anchors to
* - T the list of trusted roots (R and possible some others) * - T the list of trusted roots (R and possible some others)
* *
@ -2229,8 +2229,10 @@ int mbedtls_x509_crt_verify( mbedtls_x509_crt *crt,
* verify(E, T) -> verify_top(E, R) * verify(E, T) -> verify_top(E, R)
* 3. E -> I -> R (EE signed by intermediate signed by trusted root) * 3. E -> I -> R (EE signed by intermediate signed by trusted root)
* verify(E, T) -> verify_child(E, I, T) -> verify_top(I, R) * verify(E, T) -> verify_child(E, I, T) -> verify_top(I, R)
* (plus variant with multiple intermediates)
* 4. E -> I (EE signed by intermediate that's not trusted) * 4. E -> I (EE signed by intermediate that's not trusted)
* verify(E, T) -> verify_child(E, I, T) -> verify_top(I, T) * verify(E, T) -> verify_child(E, I, T) -> verify_top(I, T)
* (plus variant with multiple intermediates)
* 5. E (EE not trusted) * 5. E (EE not trusted)
* verify(E, T) -> verify_top(E, T) * verify(E, T) -> verify_top(E, T)
*/ */