]> tinc-vpn.org Git - tinc/blobdiff - src/ed25519/ecdsagen.c
Refactor crypto RNG; add getrandom() support
[tinc] / src / ed25519 / ecdsagen.c
index ede51367ae59e5113d78402d06082eec4dbb347a..bc14fd297abcaaf04c903562dde315059bdc07e6 100644 (file)
@@ -27,10 +27,10 @@ typedef struct {
        uint8_t public[32];
 } ecdsa_t;
 
-#include "../crypto.h"
 #include "../ecdsagen.h"
 #include "../utils.h"
 #include "../xalloc.h"
+#include "../random.h"
 
 // Generate ECDSA key
 
@@ -54,7 +54,7 @@ static bool write_pem(FILE *fp, const char *type, void *vbuf, size_t size) {
 
        while(size) {
                size_t todo = size > 48 ? 48 : size;
-               b64encode(buf, base64, todo);
+               b64encode_tinc(buf, base64, todo);
                fprintf(fp, "%s\n", base64);
                buf += todo;
                size -= todo;