Make auto DH work with DHEPSK
[openssl.git] / ssl / d1_srtp.c
index c7861b8c8ffd58a9fb2987782da5c2cfa36a14aa..19cf6ff396b554a8b170e33d1014506c39f3f6f1 100644 (file)
@@ -129,16 +129,6 @@ static SRTP_PROTECTION_PROFILE srtp_known_profiles[] = {
      "SRTP_AES128_CM_SHA1_32",
      SRTP_AES128_CM_SHA1_32,
      },
-# if 0
-    {
-     "SRTP_NULL_SHA1_80",
-     SRTP_NULL_SHA1_80,
-     },
-    {
-     "SRTP_NULL_SHA1_32",
-     SRTP_NULL_SHA1_32,
-     },
-# endif
     {0}
 };
 
@@ -149,7 +139,8 @@ static int find_profile_by_name(char *profile_name,
 
     p = srtp_known_profiles;
     while (p->name) {
-        if ((len == strlen(p->name)) && !strncmp(p->name, profile_name, len)) {
+        if ((len == strlen(p->name))
+            && strncmp(p->name, profile_name, len) == 0) {
             *pptr = p;
             return 0;
         }
@@ -167,10 +158,9 @@ static int ssl_ctx_make_profiles(const char *profiles_string,
 
     char *col;
     char *ptr = (char *)profiles_string;
-
     SRTP_PROTECTION_PROFILE *p;
 
-    if (!(profiles = sk_SRTP_PROTECTION_PROFILE_new_null())) {
+    if ((profiles = sk_SRTP_PROTECTION_PROFILE_new_null()) == NULL) {
         SSLerr(SSL_F_SSL_CTX_MAKE_PROFILES,
                SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES);
         return 1;