mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-06 00:31:10 +01:00
fixed GH #2603:Remove incorrect upper size limits for SSL certificates in NetSSL_Win
This commit is contained in:
parent
1282d757dc
commit
98d9c62efa
@ -193,7 +193,6 @@ void Context::importCertificate()
|
||||
Poco::File certFile(_certNameOrPath);
|
||||
if (!certFile.exists()) throw Poco::FileNotFoundException(_certNameOrPath);
|
||||
Poco::File::FileSize size = certFile.getSize();
|
||||
if (size > 4096) throw Poco::DataFormatException("PKCS #12 certificate file too large", _certNameOrPath);
|
||||
Poco::Buffer<char> buffer(static_cast<std::size_t>(size));
|
||||
Poco::FileInputStream istr(_certNameOrPath);
|
||||
istr.read(buffer.begin(), buffer.size());
|
||||
|
@ -397,7 +397,6 @@ void X509Certificate::importCertificate(const std::string& certPath)
|
||||
Poco::File certFile(certPath);
|
||||
if (!certFile.exists()) throw Poco::FileNotFoundException(certPath);
|
||||
Poco::File::FileSize size = certFile.getSize();
|
||||
if (size > 4096) throw Poco::DataFormatException("certificate file too large", certPath);
|
||||
if (size < 32) throw Poco::DataFormatException("certificate file too small", certPath);
|
||||
Poco::Buffer<char> buffer(static_cast<std::size_t>(size));
|
||||
Poco::FileInputStream istr(certPath);
|
||||
|
Loading…
Reference in New Issue
Block a user