aboutsummaryrefslogtreecommitdiff
path: root/libcmix-crypto/api.h
diff options
context:
space:
mode:
authorDennis Brentjes <d.brentjes@gmail.com>2016-10-11 12:39:05 +0200
committerDennis Brentjes <d.brentjes@gmail.com>2016-10-11 12:39:05 +0200
commit0fb433690c0ca5f9561fe9e2e973e2cd61b873ba (patch)
tree9422a034b09d1e0b46144f35a1f9bcf7860156d6 /libcmix-crypto/api.h
parentd8e48c32f8435076382543edfafbf81c223f9e87 (diff)
downloadcmix-0fb433690c0ca5f9561fe9e2e973e2cd61b873ba.tar.gz
cmix-0fb433690c0ca5f9561fe9e2e973e2cd61b873ba.tar.bz2
cmix-0fb433690c0ca5f9561fe9e2e973e2cd61b873ba.zip
Commit introducing Client keyexchange, triggering bugs.
Clients now send their public key to each node and the node calculates the shared secret. The node does not yet respond with it's public key. To keep this commit smaller. Nodes now disconnect from each other in a better way. Getting the relevant crypto api is now done with a generic function. What crypto algorithm and implemenation is beign used can be selected in the cmake cache (use cmake-gui or ccmake) Clients now connect correctly to multiple nodes.
Diffstat (limited to 'libcmix-crypto/api.h')
-rw-r--r--libcmix-crypto/api.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcmix-crypto/api.h b/libcmix-crypto/api.h
index 09b474b..06afcd2 100644
--- a/libcmix-crypto/api.h
+++ b/libcmix-crypto/api.h
@@ -29,7 +29,7 @@ typedef void (*KeyPairDeleter)(struct KeyPair);
* \brief Defines how a Derived Shared Key function should look like.
* Used to store a pointer to function to a implementation.
*/
-typedef struct SharedKey (*SharedKeyDeriver)(struct KeyPair, unsigned char*, bool);
+typedef struct SharedKey (*SharedKeyDeriver)(struct KeyPair, unsigned char const*, bool);
/*!
* \brief Defines how a Derived Shared Key deleter function should look like.
@@ -47,6 +47,10 @@ struct Api {
SharedKeyDeleter free_shared_key; ///< Pointer to shared key deleter function
};
+typedef struct Api(*ImplementationGetter)();
+
+extern ImplementationGetter get_implementation;
+
#ifdef __cplusplus
}
#endif