The TLS certification chain validation does not work correctly