Repository: qpid-proton Updated Branches: refs/heads/master c80e95da7 -> 622dc1f7b
PROTON-1233: Windows: provide same verification error as Posix for empty peer hostname and PN_SSL_VERIFY_PEER_NAME Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/622dc1f7 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/622dc1f7 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/622dc1f7 Branch: refs/heads/master Commit: 622dc1f7b1e31e22b3d18068376dedd540a6932b Parents: c80e95d Author: Clifford Jansen <[email protected]> Authored: Thu Jun 9 19:22:46 2016 -0700 Committer: Clifford Jansen <[email protected]> Committed: Thu Jun 9 19:22:46 2016 -0700 ---------------------------------------------------------------------- proton-c/src/windows/schannel.c | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/622dc1f7/proton-c/src/windows/schannel.c ---------------------------------------------------------------------- diff --git a/proton-c/src/windows/schannel.c b/proton-c/src/windows/schannel.c index 4b91780..0201034 100644 --- a/proton-c/src/windows/schannel.c +++ b/proton-c/src/windows/schannel.c @@ -2217,6 +2217,11 @@ static HRESULT verify_peer(pni_ssl_t *ssl, HCERTSTORE root_store, const char *se error = SEC_E_WRONG_PRINCIPAL; break; } + else if (ssl->verify_mode == PN_SSL_VERIFY_PEER_NAME && !server_name) { + ssl_log_error("Error: configuration error: PN_SSL_VERIFY_PEER_NAME configured, but no peer hostname set!"); + error = SEC_E_WRONG_PRINCIPAL; + break; + } } while (0); if (tracing && !error) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
