mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-24 14:19:08 +01:00
optimizations, certificate verification, code cleanup
This commit is contained in:
@@ -123,6 +123,25 @@ public:
|
||||
/// Returns true if verification against the issuer certificate
|
||||
/// was successful, false otherwise.
|
||||
|
||||
bool verify(const std::string& hostName) const;
|
||||
/// Verifies the validity of the certificate against the host name.
|
||||
///
|
||||
/// For this check to be successful, the certificate must contain
|
||||
/// a domain name that matches the domain name
|
||||
/// of the host.
|
||||
///
|
||||
/// Returns true if verification succeeded, or false otherwise.
|
||||
|
||||
static bool verify(const Poco::Net::X509Certificate& cert, const std::string& hostName);
|
||||
/// Verifies the validity of the certificate against the host name.
|
||||
///
|
||||
/// For this check to be successful, the certificate must contain
|
||||
/// a domain name that matches the domain name
|
||||
/// of the host.
|
||||
///
|
||||
/// Returns true if verification succeeded, or false otherwise.
|
||||
|
||||
|
||||
const PCCERT_CONTEXT system() const;
|
||||
/// Returns the underlying WinCrypt certificate.
|
||||
|
||||
@@ -139,6 +158,9 @@ protected:
|
||||
void importPEMCertificate(const char* pBuffer, std::size_t size);
|
||||
void importDERCertificate(const char* pBuffer, std::size_t size);
|
||||
|
||||
static bool containsWildcards(const std::string& commonName);
|
||||
static bool matchWildcard(const std::string& alias, const std::string& hostName);
|
||||
|
||||
private:
|
||||
enum
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user