Conversation
| X509_STORE *store = SSL_CTX_get_cert_store(backend->ctx); | ||
| HCERTSTORE hStore = CertOpenSystemStore((HCRYPTPROV_LEGACY)NULL, | ||
| TEXT("ROOT")); | ||
| HCERTSTORE hStore = CertOpenSystemStore(0, TEXT("ROOT")); |
There was a problem hiding this comment.
This is curious I think as the docs says:
This parameter is not used and should be set to NULL
So, the removed typecast is one thing but is this a pointer or not a pointer?
There was a problem hiding this comment.
HCRYPTPROV_LEGACY is a typedef for ULONG_PTR, which is an integer type that's the size of a pointer, so it seems to make more sense to use 0 instead.
There was a problem hiding this comment.
Wait, ULONG_PTR is not a pointer? I just have to double-check this!
There was a problem hiding this comment.
If it is an integer with the size of a pointer, that's 64 bit on modern systems, while 0 will be a 32 bit integer, then shouldn't it be casted to 64 bit sized integer?
Update: nah, that shouldn't be necessary.
|
Thanks! |
This is needed when building with older Windows toolchains.