make depend
[openssl.git] / ssl / ssl_conf.c
index af88a475b8c2025d17bfa2f952015d23a2b9bec6..25af065233b9f2345dc895b548f26af7a20e3c91 100644 (file)
@@ -167,6 +167,8 @@ static int ssl_set_option_list(const char *elem, int len, void *usr)
      * len == -1 indicates not being called in list context, just for single
      * command line switches, so don't allow +, -.
      */
+    if (elem == NULL)
+        return 0;
     if (len != -1) {
         if (*elem == '+') {
             elem++;
@@ -255,7 +257,7 @@ static int cmd_Curves(SSL_CONF_CTX *cctx, const char *value)
     return rv > 0;
 }
 
-#ifndef OPENSSL_NO_ECDH
+#ifndef OPENSSL_NO_EC
 /* ECDH temporary parameters */
 static int cmd_ECDHParameters(SSL_CONF_CTX *cctx, const char *value)
 {
@@ -419,8 +421,7 @@ static int cmd_DHParameters(SSL_CONF_CTX *cctx, const char *value)
     if (cctx->ssl)
         rv = SSL_set_tmp_dh(cctx->ssl, dh);
  end:
-    if (dh)
-        DH_free(dh);
+    DH_free(dh);
     if (in)
         BIO_free(in);
     return rv > 0;
@@ -445,7 +446,7 @@ static const ssl_conf_cmd_tbl ssl_conf_cmds[] = {
     SSL_CONF_CMD_STRING(SignatureAlgorithms, "sigalgs"),
     SSL_CONF_CMD_STRING(ClientSignatureAlgorithms, "client_sigalgs"),
     SSL_CONF_CMD_STRING(Curves, "curves"),
-#ifndef OPENSSL_NO_ECDH
+#ifndef OPENSSL_NO_EC
     SSL_CONF_CMD_STRING(ECDHParameters, "named_curve"),
 #endif
     SSL_CONF_CMD_STRING(CipherString, "cipher"),