#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <string.h> /* for memcpy() and strcmp() */
#define USE_SOCKETS
#include "apps.h"
#undef USE_SOCKETS
static int ssl_excert_prepend(SSL_EXCERT **pexc)
{
- SSL_EXCERT *exc = app_malloc(sizeof *exc, "prepend cert");
+ SSL_EXCERT *exc = app_malloc(sizeof(*exc), "prepend cert");
exc->certfile = NULL;
exc->keyfile = NULL;
const char *flag = sk_OPENSSL_STRING_value(str, i);
const char *arg = sk_OPENSSL_STRING_value(str, i + 1);
/* If no_ecdhe or named curve already specified don't need a default. */
- if (!no_ecdhe && !strcmp(flag, "-named_curve"))
+ if (!no_ecdhe && strcmp(flag, "-named_curve") == 0)
no_ecdhe = 1;
#ifndef OPENSSL_NO_JPAKE
- if (!no_jpake && !strcmp(flag, "-cipher")) {
+ if (!no_jpake && (strcmp(flag, "-cipher") == 0)) {
BIO_puts(bio_err, "JPAKE sets cipher to PSK\n");
return 0;
}