Added support for loading certificates and private key pairs from PKCS #12 files, as well as loading certificates (without private key) from PEM or DER files. Some code restructuring and cleanup.

This commit is contained in:
Günter Obiltschnig
2014-10-07 23:16:58 +02:00
parent 75919178fb
commit 8bf66bb3f9
53 changed files with 1809 additions and 402 deletions

View File

@@ -1,9 +1,9 @@
//
// SecureSocketImpl.h
//
// $Id: //poco/1.4/NetSSL_Schannel/include/Poco/Net/SecureSocketImpl.h#1 $
// $Id$
//
// Library: NetSSL_Schannel
// Library: NetSSL_Win
// Package: SSLSockets
// Module: SecureSocketImpl
//
@@ -194,8 +194,7 @@ protected:
bool loadSecurityLibrary();
void initClientContext();
void initServerContext();
PCCERT_CONTEXT loadCertificate(const std::string& certStore, const std::string& certName, bool useMachineStore, bool mustFindCertificate);
void acquireSchannelContext(Mode mode, PCCERT_CONTEXT pCertContext, CredHandle& outHandle);
PCCERT_CONTEXT loadCertificate(bool mustFindCertificate);
void initCommon();
void cleanup();
void performClientHandshake();
@@ -217,7 +216,6 @@ protected:
void stateConnected();
void acceptSSL();
void connectSSL(bool completeHandshake);
DWORD proto() const;
static int lastError();
void stateMachine();
void setState(State st);
@@ -232,7 +230,6 @@ private:
std::string _peerHostName;
bool _useMachineStore;
bool _clientAuthRequired;
HCERTSTORE _hCertificateStore;
PCCERT_CONTEXT _pServerCertificate;
PCCERT_CONTEXT _pPeerCertificate;