mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-06-19 08:58:00 +00: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
|
Changes
|
||||||
* Introduced POLARSSL_HAVE_READDIR_R for systems without it
|
* 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
|
= Version 1.2.10 released 2013-10-07
|
||||||
Changes
|
Changes
|
||||||
* Changed RSA blinding to a slower but thread-safe version
|
* 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];
|
diff = n1[i] ^ n2[i];
|
||||||
|
|
||||||
if( ( n1[i] >= 'a' || n1[i] <= 'z' ) && ( diff == 0 || diff == 32 ) )
|
if( diff == 0 )
|
||||||
continue;
|
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;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
return( 1 );
|
return( 1 );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue