Skip to content

Commit 88e56cd

Browse files
committed
winldap: Clarify SDK differences in VERIFYSERVERCERT prototype
- Clarify that the incorrect VERIFYSERVERCERT function prototype is limited to some older SDKs. Ref: curl/curl#22152 (comment) Closes #xxxx
1 parent 8fe437c commit 88e56cd

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

sdk-api-src/content/winldap/nc-winldap-verifyservercert.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,12 @@ conn, LDAP_OPT_SERVER_CERTIFICATE, &CertRoutine
8383

8484
The server calls <b>VERIFYSERVERCERT</b> after the secure connection has been established. The server's certificate context is supplied for examination by the client.
8585

86+
87+
Even though in some old SDKs <b>VERIFYSERVERCERT</b> is declared as receiving a <a href="/windows/desktop/api/wincrypt/ns-wincrypt-cert_context">PCCERT_CONTEXT</a>, it in fact receives a <b>PCCERT_CONTEXT</b>*.
88+
8689
An application should use the <i>ppServerCert</i> parameter as: <code>PCCERT_CONTEXT* ppServerCert = (PCCERT_CONTEXT*)pServerCert;</code>
8790

88-
Even though <b>VERIFYSERVERCERT</b> is declared as receiving a <a href="/windows/desktop/api/wincrypt/ns-wincrypt-cert_context">PCCERT_CONTEXT</a>, it in fact receives a <b>PCCERT_CONTEXT</b>*. The <i>ppServerCert</i> can be used to verify the certificate. <a href="/windows/desktop/api/wincrypt/nf-wincrypt-certfreecertificatecontext">CertFreeCertificateContext</a> should be called before this function returns. The call to this function should be made as follows:
91+
The <i>ppServerCert</i> can be used to verify the certificate. <a href="/windows/desktop/api/wincrypt/nf-wincrypt-certfreecertificatecontext">CertFreeCertificateContext</a> should be called before this function returns. The call to this function should be made as follows:
8992

9093

9194
```cpp

0 commit comments

Comments
 (0)