
Chapter 9. Porting open system applications to a z/TPF system 193
/*Make sure the key and certificate file match*/
if (!SSL_CTX_check_private_key(ctx)) {
goto closedown;
}
SSL_CTX_set_verify(ctx,SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT,NULL);
myssl=SSL_new(ctx);
SSL_set_fd(myssl,connection_socket);
err=SSL_accept(myssl);
/* issue SSL_get_peer_certificate_FQDN() for the first dNSName */
length = 30;
SSL_get_peer_certificate_FQDN(myssl, Dns_n1, NULL, NULL, NULL, NULL, length);
/* issue SSL_get_peer_certificate_subject_info() */
c_len = sizeof(country);
st_len = sizeof(state);
city_len = sizeof(city);
company_len = sizeof(company);
c_unit_len = size ...