Find certificate from Windows store using its thumbprint#2123
Find certificate from Windows store using its thumbprint#2123haismail wants to merge 2 commits intopocoproject:poco-1.8.2from
Conversation
| { | ||
| // Sanity check for the hash value. | ||
| if(_certInfoOrPath.size() % 2) throw CertificateException(Poco::format("Invalid certificate hash %s", _certInfoOrPath)); | ||
|
|
There was a problem hiding this comment.
The length of _certInfoOrPath should be checked here as well to prevent a potential buffer overrun later on.
NetSSL_Win/src/Context.cpp
Outdated
| #include "Poco/MemoryStream.h" | ||
| #include "Poco/Base64Decoder.h" | ||
| #include "Poco/Buffer.h" | ||
| #include "Poco/HexBinaryDecoder.h" |
There was a problem hiding this comment.
HexBinaryDecoder is included but not used.
| int bufferSize = 0; | ||
| int byte = 0; | ||
| std::string szHex; | ||
| for(int counter = 0; counter < _certInfoOrPath.size() / 2; counter++) |
There was a problem hiding this comment.
Possibly use HexBinaryDecoder here?
There was a problem hiding this comment.
I tried to use it, but for some reason it's not working as I expected.
|
Travis CI build failed twice. Based on the logs it seems not to be related to my changes |
|
Re-triggering the Travis build by closing and reopening. |
|
Hi @aleks-f, any idea why Travis build is failing? |
|
@haismail depends, often it times out or misses some dependency download. In any case, travis does not matter for this pull, since it is windows-only. @zosrothko can we get rid of the PDF build in 1.8.2 travis as well? |
|
@haismail this should be redirected to devel branch |
|
@haismail any interest to have this in 1.13? |
|
@haismail, please update the PR to be merged to branch devel ASAP to get it merged into release 1.13. |
|
Rebased the PR on branch https://github.com/pocoproject/poco/tree/refs/heads/2125-windows-cert-store |
Trying to find a certificate using certificateName turned out to be really difficult. It's always giving Failed to find certificate error, so I added the possibility to search a certificate using its SHA1 hash.