BIO_s_datagram() ctrl doesn't support SEEK/TELL, so don't pretend it does
[openssl.git] / ssl / ssl_cert.c
index 7571095932b9072910a043a59a9ce6e2d44f3ad9..3304a1d164d49a610445a1853d0875d40252fe50 100644 (file)
@@ -333,13 +333,13 @@ CERT *ssl_cert_dup(CERT *cert)
         goto err;
     if (!custom_exts_copy(&ret->srv_ext, &cert->srv_ext))
         goto err;
-
+#ifndef OPENSSL_NO_PSK
     if (cert->psk_identity_hint) {
         ret->psk_identity_hint = BUF_strdup(cert->psk_identity_hint);
         if (ret->psk_identity_hint == NULL)
             goto err;
     }
-
+#endif
     return (ret);
 
  err:
@@ -625,7 +625,7 @@ STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx)
 
 STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s)
 {
-    if (s->type == SSL_ST_CONNECT) { /* we are in the client */
+    if (!s->server) { /* we are in the client */
         if (((s->version >> 8) == SSL3_VERSION_MAJOR) && (s->s3 != NULL))
             return (s->s3->tmp.ca_names);
         else