diff options
author | Alexandr Galiuzov <agaliuzov@luxoft.com> | 2015-08-03 14:21:46 +0300 |
---|---|---|
committer | Aleksandr Galiuzov <AGaliuzov@luxoft.com> | 2015-10-02 01:38:07 +0300 |
commit | 158aa1da4f33fd17466e72a384bb22e710180cb2 (patch) | |
tree | f7ddc8bef538c80866f7ae5308cf31c5a1b3aa96 /src/components/include/security_manager/crypto_manager.h | |
parent | f27ec44eb97ebb562c21629dcbd46ff8d9823871 (diff) | |
download | sdl_core-158aa1da4f33fd17466e72a384bb22e710180cb2.tar.gz |
Implement getting certificate from policy table
The commit contains changes which allows to obtain certificate for SSL
from policy table. The certificate stored as base64 encoded PKCS12.
The main flow as follows:
User start SDL: lify_cycle asks about certificate from policy pass it to
crypto manager which is creates SSL context with this data.
Policy updated certidficate: Crypto manager has been notified over
OnCertificateUpdated callback and reset
new certificate and private key into SSL
context.
Test was changed as well. Now our tests are using encoded pkcs12 as well.
Implements: APPLINK-12186
Closes-Issue: APPLINK-12187
Diffstat (limited to 'src/components/include/security_manager/crypto_manager.h')
-rw-r--r-- | src/components/include/security_manager/crypto_manager.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/include/security_manager/crypto_manager.h b/src/components/include/security_manager/crypto_manager.h index 00c3833e62..fd8e058d10 100644 --- a/src/components/include/security_manager/crypto_manager.h +++ b/src/components/include/security_manager/crypto_manager.h @@ -57,11 +57,11 @@ class CryptoManager { virtual bool Init(Mode mode, Protocol protocol, const std::string &cert_filename, - const std::string &key_filename, const std::string &ciphers_list, - bool verify_peer) = 0; - virtual void Finish() = 0; + bool verify_peer, + const std::string& ca_cert_file) = 0; virtual SSLContext *CreateSSLContext() = 0; + virtual bool OnCertificateUpdated(const std::string& data) = 0; virtual void ReleaseSSLContext(SSLContext *context) = 0; virtual std::string LastError() const = 0; virtual ~CryptoManager() { } |