diff options
Diffstat (limited to 'src/lib/export_decryption_settings.cc')
| -rw-r--r-- | src/lib/export_decryption_settings.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/export_decryption_settings.cc b/src/lib/export_decryption_settings.cc index 1ba791251..13c6bda28 100644 --- a/src/lib/export_decryption_settings.cc +++ b/src/lib/export_decryption_settings.cc @@ -65,10 +65,10 @@ import_decryption_chain_and_key(boost::filesystem::path const& path) } current += buffer; - if (strncmp(buffer, "-----END CERTIFICATE-----", 25) == 0) { + if (current.find("-----END CERTIFICATE-----") != string::npos) { new_chain->add(dcp::Certificate(current)); current = ""; - } else if (strncmp(buffer, "-----END RSA PRIVATE KEY-----", 29) == 0) { + } else if (current.find("-----END") != string::npos && current.find("PRIVATE KEY-----", 29) != string::npos) { new_chain->set_key(current); current = ""; } |
