diff options
author | Jack Lloyd <[email protected]> | 2017-12-04 15:57:31 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2017-12-04 15:57:31 -0500 |
commit | 5022191613a44f6d603294abfa79b2faf5a175ed (patch) | |
tree | fa237089991bd80bdef354c6c2bd639f69da5ac1 /src/lib/x509 | |
parent | 697fdc8fcb7f4ada4699ccad80def4673270d133 (diff) |
Need binary IO for Windows
Diffstat (limited to 'src/lib/x509')
-rw-r--r-- | src/lib/x509/pkcs10.cpp | 2 | ||||
-rw-r--r-- | src/lib/x509/x509_crl.cpp | 2 | ||||
-rw-r--r-- | src/lib/x509/x509_obj.cpp | 12 | ||||
-rw-r--r-- | src/lib/x509/x509cert.cpp | 2 |
4 files changed, 4 insertions, 14 deletions
diff --git a/src/lib/x509/pkcs10.cpp b/src/lib/x509/pkcs10.cpp index a17ffeb0f..1f7e915ff 100644 --- a/src/lib/x509/pkcs10.cpp +++ b/src/lib/x509/pkcs10.cpp @@ -47,7 +47,7 @@ PKCS10_Request::PKCS10_Request(const std::vector<uint8_t>& vec) #if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) PKCS10_Request::PKCS10_Request(const std::string& fsname) { - DataSource_Stream src(fsname); + DataSource_Stream src(fsname, true); load_data(src); } #endif diff --git a/src/lib/x509/x509_crl.cpp b/src/lib/x509/x509_crl.cpp index 4fa5df44f..a739d2f60 100644 --- a/src/lib/x509/x509_crl.cpp +++ b/src/lib/x509/x509_crl.cpp @@ -49,7 +49,7 @@ X509_CRL::X509_CRL(const std::vector<uint8_t>& vec) #if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) X509_CRL::X509_CRL(const std::string& fsname) { - DataSource_Stream src(fsname); + DataSource_Stream src(fsname, true); load_data(src); } #endif diff --git a/src/lib/x509/x509_obj.cpp b/src/lib/x509/x509_obj.cpp index 019bac0b1..4450df7bb 100644 --- a/src/lib/x509/x509_obj.cpp +++ b/src/lib/x509/x509_obj.cpp @@ -113,17 +113,7 @@ void X509_Object::decode_from(BER_Decoder& from) .decode(m_sig, BIT_STRING) .end_cons(); - try { - force_decode(); - } - catch(Decoding_Error& e) - { - throw Decoding_Error(PEM_label() + " decoding failed", e.what()); - } - catch(Invalid_Argument& e) - { - throw Decoding_Error(PEM_label() + " decoding failed", e.what()); - } + force_decode(); } /* diff --git a/src/lib/x509/x509cert.cpp b/src/lib/x509/x509cert.cpp index 35dbd4c38..acd6b3362 100644 --- a/src/lib/x509/x509cert.cpp +++ b/src/lib/x509/x509cert.cpp @@ -84,7 +84,7 @@ X509_Certificate::X509_Certificate(const std::vector<uint8_t>& vec) #if defined(BOTAN_TARGET_OS_HAS_FILESYSTEM) X509_Certificate::X509_Certificate(const std::string& fsname) { - DataSource_Stream src(fsname); + DataSource_Stream src(fsname, true); load_data(src); } #endif |