summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-04-11 17:17:48 +0200
committerlouiz’ <louiz@louiz.org>2016-04-22 10:49:06 +0200
commit73ad709ddf5db77e721b7080da64603aab10de17 (patch)
tree2286ddfb97e1702d43c45a677cddcca696c08239
parentd57b8bb8c3edc4271a9be3d052a220db09250a7e (diff)
downloadbiboumi-73ad709ddf5db77e721b7080da64603aab10de17.tar.gz
biboumi-73ad709ddf5db77e721b7080da64603aab10de17.tar.bz2
biboumi-73ad709ddf5db77e721b7080da64603aab10de17.tar.xz
biboumi-73ad709ddf5db77e721b7080da64603aab10de17.zip
Add a TEMPORARY work-around for botan 1.11.29
-rw-r--r--louloulibs/network/credentials_manager.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/louloulibs/network/credentials_manager.cpp b/louloulibs/network/credentials_manager.cpp
index d5b0eb3..c5b8493 100644
--- a/louloulibs/network/credentials_manager.cpp
+++ b/louloulibs/network/credentials_manager.cpp
@@ -81,8 +81,18 @@ void BasicCredentialsManager::load_certs()
log_debug("Using ca bundle: " << path);
while (!bundle.end_of_data() && bundle.check_available(27))
{
- const Botan::X509_Certificate cert(bundle);
- BasicCredentialsManager::certificate_store.add_certificate(cert);
+ // TODO: remove this work-around for Botan 1.11.29
+ // https://github.com/randombit/botan/issues/438#issuecomment-192866796
+ // Note that every certificate that fails to be transcoded into latin-1
+ // will be ignored. As a result, some TLS connection may be refused
+ // because the certificate is signed by an issuer that was ignored.
+ try {
+ const Botan::X509_Certificate cert(bundle);
+ BasicCredentialsManager::certificate_store.add_certificate(cert);
+ } catch (const Botan::Decoding_Error& error)
+ {
+ continue;
+ }
}
// Only use the first file that can successfully be read.
goto success;