mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 06:35:47 +01:00
Fixed X.509 hostname comparison (with non-regular characters)
This commit is contained in:
parent
cf78ba2b89
commit
c941adba31
@ -4,6 +4,9 @@ PolarSSL ChangeLog
|
||||
Changes
|
||||
* Introduced POLARSSL_HAVE_READDIR_R for systems without it
|
||||
|
||||
Bugfix
|
||||
* Fixed X.509 hostname comparison (with non-regular characters)
|
||||
|
||||
= Version 1.2.10 released 2013-10-07
|
||||
Changes
|
||||
* Changed RSA blinding to a slower but thread-safe version
|
||||
|
@ -3281,11 +3281,15 @@ static int x509_name_cmp( const void *s1, const void *s2, size_t len )
|
||||
{
|
||||
diff = n1[i] ^ n2[i];
|
||||
|
||||
if( ( n1[i] >= 'a' || n1[i] <= 'z' ) && ( diff == 0 || diff == 32 ) )
|
||||
if( diff == 0 )
|
||||
continue;
|
||||
|
||||
if( ( n1[i] >= 'A' || n1[i] <= 'Z' ) && ( diff == 0 || diff == 32 ) )
|
||||
if( diff == 32 &&
|
||||
( ( n1[i] >= 'a' && n1[i] <= 'z' ) ||
|
||||
( n1[i] >= 'A' && n1[i] <= 'Z' ) ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return( 1 );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user