projects
/
tinc
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Try all known addresses of node during the PMTU discovery phase.
[tinc]
/
src
/
openssl
/
ecdsagen.c
diff --git
a/src/openssl/ecdsagen.c
b/src/openssl/ecdsagen.c
index
93b0df6
..
883c77e
100644
(file)
--- a/
src/openssl/ecdsagen.c
+++ b/
src/openssl/ecdsagen.c
@@
-1,6
+1,6
@@
/*
ecdsagen.c -- ECDSA key generation and export
/*
ecdsagen.c -- ECDSA key generation and export
- Copyright (C) 20
08
Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 20
11
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
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
@@
-23,7
+23,6
@@
#include <openssl/err.h>
#include <openssl/obj_mac.h>
#include <openssl/err.h>
#include <openssl/obj_mac.h>
-#include "logger.h"
#include "ecdsagen.h"
#include "utils.h"
#include "ecdsagen.h"
#include "utils.h"
@@
-33,8
+32,8
@@
bool ecdsa_generate(ecdsa_t *ecdsa) {
*ecdsa = EC_KEY_new_by_curve_name(NID_secp521r1);
if(!EC_KEY_generate_key(*ecdsa)) {
*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);
}
EC_KEY_set_asn1_flag(*ecdsa, OPENSSL_EC_NAMED_CURVE);
@@
-68,7
+67,7
@@
char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa) {
int len = i2o_ECPublicKey(*ecdsa, &pubkey);
char *base64 = malloc(len * 4 / 3 + 5);
int len = i2o_ECPublicKey(*ecdsa, &pubkey);
char *base64 = malloc(len * 4 / 3 + 5);
- b64encode(pubkey, base64, len);
+ b64encode(
(char *)
pubkey, base64, len);
free(pubkey);
free(pubkey);