summaryrefslogtreecommitdiff
path: root/curve.h
diff options
context:
space:
mode:
authorDaniel Borkmann <dborkman@redhat.com>2013-06-15 20:13:59 +0200
committerDaniel Borkmann <dborkman@redhat.com>2013-06-15 20:13:59 +0200
commitbc41b879d5f8d2286f094d85222d0d40b90ace00 (patch)
tree14ffcfade84b5ec410449ff27708c76c45c6ab4f /curve.h
parentc5f3b0db5b9274ab32fb203260ab15eecae64291 (diff)
curve: curve25519_tfm_alloc/curve25519_tfm_free helpers
Facilitate allocation and destruction of crypto objects through common helper functions. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Diffstat (limited to 'curve.h')
-rw-r--r--curve.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/curve.h b/curve.h
index d9c2584..1b3a919 100644
--- a/curve.h
+++ b/curve.h
@@ -21,8 +21,11 @@ struct curve25519_struct {
};
extern void curve25519_selftest(void);
-extern void curve25519_alloc_or_maybe_die(struct curve25519_struct *curve);
-extern void curve25519_free(void *curve);
+
+extern struct curve25519_struct *curve25519_tfm_alloc(void);
+extern void curve25519_tfm_free(struct curve25519_struct *tfm);
+extern void curve25519_tfm_free_void(void *tfm);
+
extern void curve25519_proto_init(struct curve25519_proto *proto,
unsigned char *pubkey_remote, size_t len);
extern int curve25519_pubkey_hexparse_32(unsigned char *bin, size_t blen,