/*
- * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
*
* Licensed under the OpenSSL license (the "License"). You may not use
#include <string.h>
#include <math.h>
#include "apps.h"
+#include "progs.h"
#include <openssl/crypto.h>
#include <openssl/rand.h>
#include <openssl/err.h>
|| !defined(OPENSSL_NO_EC)
long rsa_count = 1;
#endif
+#ifndef OPENSSL_NO_EC
+ size_t loop;
+#endif
/* What follows are the buffers and key material. */
#ifndef OPENSSL_NO_RC5
#endif
#ifndef OPENSSL_NO_EC
if (strcmp(*argv, "ecdsa") == 0) {
- for (i = 0; i < EC_NUM; i++)
- ecdsa_doit[i] = 1;
+ for (loop = 0; loop < OSSL_NELEM(ecdsa_choices); loop++)
+ ecdsa_doit[ecdsa_choices[loop].retval] = 1;
continue;
}
if (found(*argv, ecdsa_choices, &i)) {
continue;
}
if (strcmp(*argv, "ecdh") == 0) {
- for (i = 0; i < EC_NUM; i++)
- ecdh_doit[i] = 1;
+ for (loop = 0; loop < OSSL_NELEM(ecdh_choices); loop++)
+ ecdh_doit[ecdh_choices[loop].retval] = 1;
continue;
}
if (found(*argv, ecdh_choices, &i)) {
dsa_doit[i] = 1;
#endif
#ifndef OPENSSL_NO_EC
- for (i = 0; i < EC_NUM; i++)
- ecdsa_doit[i] = 1;
- for (i = 0; i < EC_NUM; i++)
- ecdh_doit[i] = 1;
+ for (loop = 0; loop < OSSL_NELEM(ecdsa_choices); loop++)
+ ecdsa_doit[ecdsa_choices[loop].retval] = 1;
+ for (loop = 0; loop < OSSL_NELEM(ecdh_choices); loop++)
+ ecdh_doit[ecdh_choices[loop].retval] = 1;
#endif
}
for (i = 0; i < ALGOR_NUM; i++)