X-Git-Url: http://git.meshlink.io/?p=meshlink;a=blobdiff_plain;f=src%2Fecdsa.h;h=6da3d2f403ebec58d4ff10a5b9c3f3e3c751b39d;hp=ef10fe718363b7f87220eeae141d6492c1940f7c;hb=963c5055505f2fc117cd5efa06eaa02c9b2bf85d;hpb=196806f90f40fcc0cf727abd4bed6bc5aefff5ff diff --git a/src/ecdsa.h b/src/ecdsa.h index ef10fe71..6da3d2f4 100644 --- a/src/ecdsa.h +++ b/src/ecdsa.h @@ -1,6 +1,9 @@ +#ifndef MESHLINK_ECDSA_H +#define MESHLINK_ECDSA_H + /* ecdsa.h -- ECDSA key handling - Copyright (C) 2014 Guus Sliepen + Copyright (C) 2014, 2017 Guus Sliepen 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 @@ -17,15 +20,16 @@ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __MESHLINK_ECDSA_H__ -#define __MESHLINK_ECDSA_H__ - #ifndef __MESHLINK_ECDSA_INTERNAL__ typedef struct ecdsa ecdsa_t; #endif +extern ecdsa_t *ecdsa_set_private_key(const void *p) __attribute__((__malloc__)); extern ecdsa_t *ecdsa_set_base64_public_key(const char *p) __attribute__((__malloc__)); +extern ecdsa_t *ecdsa_set_public_key(const void *p) __attribute__((__malloc__)); extern char *ecdsa_get_base64_public_key(ecdsa_t *ecdsa); +extern const void *ecdsa_get_public_key(ecdsa_t *ecdsa) __attribute__((__malloc__)); +extern const void *ecdsa_get_private_key(ecdsa_t *ecdsa) __attribute__((__malloc__)); extern ecdsa_t *ecdsa_read_pem_public_key(FILE *fp) __attribute__((__malloc__)); extern ecdsa_t *ecdsa_read_pem_private_key(FILE *fp) __attribute__((__malloc__)); extern size_t ecdsa_size(ecdsa_t *ecdsa);