Function qpid_proton_sys::pn_ssl_set_peer_hostname[][src]

pub unsafe extern "C" fn pn_ssl_set_peer_hostname(
    ssl: *mut pn_ssl_t,
    hostname: *const c_char
) -> i64
Expand description

Set the expected identity of the remote peer. By default, SSL will use the hostname associated with the connection that the transport is bound to (see pn_connection_set_hostname). This method allows the caller to override that default. The hostname is used for two purposes: 1) when set on an SSL client, it is sent to the server during the handshake (if Server Name Indication is supported), and 2) it is used to check against the identifying name provided in the peer’s certificate. If the supplied name does not exactly match a SubjectAltName (type DNS name), or the CommonName entry in the peer’s certificate, the peer is considered unauthenticated (potential imposter), and the SSL connection is aborted.