mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 19:45:44 +01:00
X509 key identifiers depend on SHA1
This commit is contained in:
parent
f8669dabf2
commit
3daaf3d21d
@ -400,6 +400,7 @@ int x509write_crt_set_extension( x509write_cert *ctx,
|
||||
int x509write_crt_set_basic_constraints( x509write_cert *ctx,
|
||||
int is_ca, int max_pathlen );
|
||||
|
||||
#if defined(POLARSSL_SHA1_C)
|
||||
/**
|
||||
* \brief Set the subjectKeyIdentifier extension for a CRT
|
||||
* Requires that x509write_crt_set_subject_key() has been
|
||||
@ -421,6 +422,7 @@ int x509write_crt_set_subject_key_identifier( x509write_cert *ctx );
|
||||
* \return 0 if successful, or a POLARSSL_ERR_X509WRITE_MALLOC_FAILED
|
||||
*/
|
||||
int x509write_crt_set_authority_key_identifier( x509write_cert *ctx );
|
||||
#endif /* POLARSSL_SHA1_C */
|
||||
|
||||
/**
|
||||
* \brief Set the Key Usage Extension flags
|
||||
|
@ -156,6 +156,7 @@ int x509write_crt_set_basic_constraints( x509write_cert *ctx,
|
||||
0, buf + sizeof(buf) - len, len );
|
||||
}
|
||||
|
||||
#if defined(POLARSSL_SHA1_C)
|
||||
int x509write_crt_set_subject_key_identifier( x509write_cert *ctx )
|
||||
{
|
||||
int ret;
|
||||
@ -202,6 +203,7 @@ int x509write_crt_set_authority_key_identifier( x509write_cert *ctx )
|
||||
OID_SIZE( OID_AUTHORITY_KEY_IDENTIFIER ),
|
||||
0, buf + sizeof(buf) - len, len );
|
||||
}
|
||||
#endif /* POLARSSL_SHA1_C */
|
||||
|
||||
int x509write_crt_set_key_usage( x509write_cert *ctx, unsigned char key_usage )
|
||||
{
|
||||
|
@ -571,6 +571,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
printf( " ok\n" );
|
||||
|
||||
#if defined(POLARSSL_SHA1_C)
|
||||
printf( " . Adding the Subject Key Identifier ..." );
|
||||
fflush( stdout );
|
||||
|
||||
@ -596,6 +597,7 @@ int main( int argc, char *argv[] )
|
||||
}
|
||||
|
||||
printf( " ok\n" );
|
||||
#endif /* POLARSSL_SHA1_C */
|
||||
|
||||
if( opt.key_usage )
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ void x509_csr_check( char *key_file, int md_type,
|
||||
}
|
||||
/* END_CASE */
|
||||
|
||||
/* BEGIN_CASE depends_on:POLARSSL_PEM_WRITE_C:POLARSSL_X509_CRT_WRITE_C */
|
||||
/* BEGIN_CASE depends_on:POLARSSL_PEM_WRITE_C:POLARSSL_X509_CRT_WRITE_C:POLARSSL_SHA1_C */
|
||||
void x509_crt_check( char *subject_key_file, char *subject_pwd,
|
||||
char *subject_name, char *issuer_key_file,
|
||||
char *issuer_pwd, char *issuer_name,
|
||||
|
Loading…
Reference in New Issue
Block a user