vinix-ports / openssl / ec-methods.c
18 lines · 17 sloc · 552 bytes · d164630c15614167af646b200576c72d35b34c51
Raw
1#define OPENSSL_SUPPRESS_DEPRECATED
2#include <openssl/ec.h>
3
4/* Applications from the release can import each of these OpenSSL 3 symbols. */
5int main(void) {
6 const EC_METHOD *methods[] = {
7 EC_GFp_nistp224_method(), EC_GFp_nistp256_method(), EC_GFp_nistp521_method()
8 };
9 for (unsigned i = 0; i < sizeof(methods) / sizeof(methods[0]); ++i) {
10 if (!methods[i])
11 return 1;
12 EC_GROUP *group = EC_GROUP_new(methods[i]);
13 if (!group)
14 return 2;
15 EC_GROUP_free(group);
16 }
17 return 0;
18}
19