Fix segfaults related to copying DH parameters.
[trust_router.git] / include / trust_router / tr_dh.h
index 41751a9..7de6249 100644 (file)
 #include <trust_router/tr_versioning.h>
 #include <trust_router/tid.h>
 
-
+TR_EXPORT DH *tr_dh_new(void);
+TR_EXPORT void tr_dh_free(DH *dh);
 TR_EXPORT DH *tr_create_dh_params(unsigned char *key, size_t len);
 TR_EXPORT DH *tr_create_matching_dh(unsigned char *key, size_t len, DH *in_dh);
 TR_EXPORT void tr_destroy_dh_params(DH *dh);
+TR_EXPORT DH *tr_dh_dup(DH *in);
 TR_EXPORT int tr_compute_dh_key(unsigned char **pbuf,  BIGNUM *pub_key, DH *priv_dh);
 
 int TR_EXPORT tr_dh_pub_hash(TID_REQ *request,
@@ -51,7 +53,4 @@ int TR_EXPORT tr_dh_pub_hash(TID_REQ *request,
                             size_t *out_llen);
 
 
-TR_EXPORT void tr_bin_to_hex(const unsigned char * bin, size_t binlen,
-                            char * hex_out, size_t hex_len);
-
 #endif