/*
ecdsa.c -- ECDSA key handling
- Copyright (C) 2011-2013 Guus Sliepen <guus@tinc-vpn.org>
+ Copyright (C) 2014 Guus Sliepen <guus@meshlink.io>
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 "ed25519.h"
-#define __TINC_ECDSA_INTERNAL__
+#define __MESHLINK_ECDSA_INTERNAL__
typedef struct {
uint8_t private[64];
uint8_t public[32];
int len = strlen(p);
if(len != 43) {
- logger(DEBUG_ALWAYS, LOG_ERR, "Invalid size %s for public key!", len);
+ logger(NULL, MESHLINK_ERROR, "Invalid size %d for public key!", len);
return 0;
}
ecdsa_t *ecdsa = xzalloc(sizeof *ecdsa);
len = b64decode(p, ecdsa->public, len);
if(len != 32) {
- logger(DEBUG_ALWAYS, LOG_ERR, "Invalid format of public key! len = %d", len);
+ logger(NULL, MESHLINK_ERROR, "Invalid format of public key! len = %d", len);
free(ecdsa);
return 0;
}