/*
ecdsagen.c -- ECDSA key generation and export
- Copyright (C) 2008 Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 2011 Guus Sliepen <guus@tinc-vpn.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include <openssl/err.h>
#include <openssl/obj_mac.h>
-#include "logger.h"
#include "ecdsagen.h"
#include "utils.h"
*ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!EC_KEY_generate_key(*ecdsa)) {
- logger(LOG_ERR, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
- abort();
+ fprintf(stderr, "Generating EC key failed: %s", ERR_error_string(ERR_get_error(), NULL));
+ return false;
}
EC_KEY_set_asn1_flag(*ecdsa, OPENSSL_EC_NAMED_CURVE);