Fix s_server -ssl2. Previously this reported "Error setting EC curve"
[oweals/openssl.git] / apps / s_cb.c
index 9dda23c023a25ca64bb726429cdcecef189cd6c9..e597eb360f9ae65c0e8eec5623188cc70a6ed7f2 100644 (file)
@@ -881,9 +881,6 @@ void MS_CALLBACK msg_cb(int write_p, int version, int content_type, const void *
                                case 20:
                                        str_details1 = ", Finished";
                                        break;
-                               case 23:
-                                       str_details1 = ", SupplementalData";
-                                       break;
                                        }
                                }
                        }
@@ -1030,6 +1027,9 @@ void MS_CALLBACK tlsext_cb(SSL *s, int client_server, int type,
                extname = "encrypt-then-mac";
                break;
 #endif
+               case TLSEXT_TYPE_padding:
+               extname = "TLS padding";
+               break;
 
                default:
                extname = "unknown";
@@ -1407,9 +1407,15 @@ int load_excert(SSL_EXCERT **pexc, BIO *err)
                if (!exc->cert)
                        return 0;
                if (exc->keyfile)
-                       exc->keyfile = exc->certfile;
-               exc->key = load_key(err, exc->certfile, exc->certform, 0,
-                                       NULL, NULL, "Server Certificate");
+                       {
+                       exc->key = load_key(err, exc->keyfile, exc->keyform,
+                                           0, NULL, NULL, "Server Key");
+                       }
+               else
+                       {
+                       exc->key = load_key(err, exc->certfile, exc->certform,
+                                           0, NULL, NULL, "Server Key");
+                       }
                if (!exc->key)
                        return 0;
                if (exc->chainfile)
@@ -1418,7 +1424,7 @@ int load_excert(SSL_EXCERT **pexc, BIO *err)
                                                exc->chainfile, FORMAT_PEM,
                                                NULL, NULL,
                                                "Server Chain");
-                       if (!exc->chainfile)
+                       if (!exc->chain)
                                return 0;
                        }
                }