diff options
author | lloyd <[email protected]> | 2012-11-13 21:52:08 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2012-11-13 21:52:08 +0000 |
commit | 71c830895b13aea99d24818de775a036062fa3d7 (patch) | |
tree | 38f5035a595366658bbd6e4e2786d3272cd8997b | |
parent | cf8f87c832273ea2d70ed00be7130e36884e370c (diff) |
Update for new cred API
-rw-r--r-- | doc/examples/credentials.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/doc/examples/credentials.h b/doc/examples/credentials.h index 2aeb3ab65..d96c9d852 100644 --- a/doc/examples/credentials.h +++ b/doc/examples/credentials.h @@ -43,25 +43,20 @@ class Credentials_Manager_Simple : public Botan::Credentials_Manager return false; } - std::vector<Botan::X509_Certificate> + std::vector<Botan::Certificate_Store*> trusted_certificate_authorities(const std::string& type, const std::string& hostname) { - std::vector<Botan::X509_Certificate> certs; - - /* - if(type == "tls-server" && hostname == "localhost") - { - Botan::X509_Certificate testca("testCA.crt"); - certs.push_back(testca); - } - */ + std::vector<Botan::Certificate_Store*> certs; if(type == "tls-client" && hostname == "twitter.com") { Botan::X509_Certificate verisign("/usr/share/ca-certificates/mozilla/VeriSign_Class_3_Public_Primary_Certification_Authority_-_G5.crt"); - certs.push_back(verisign); + + auto store = new Botan::Certificate_Store_In_Memory; + store->add_certificate(verisign); + certs.push_back(store); } return certs; |