aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-16 03:08:58 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-10-16 03:08:58 +0000
commit53996e84464de3aa908053e9a480e238b11b86e5 (patch)
treedd9324a8de3f54f72ab9c785deed1bfaf6a8244b /include
parente62d1e4e3353d38d85e2d4fcc98648b540890081 (diff)
Make crypto loading optional
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6797 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'include')
-rwxr-xr-xinclude/asterisk/crypto.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/include/asterisk/crypto.h b/include/asterisk/crypto.h
index 69010714c..7d86da16d 100755
--- a/include/asterisk/crypto.h
+++ b/include/asterisk/crypto.h
@@ -42,14 +42,7 @@ struct ast_key;
*
* Returns the key on success or NULL on failure
*/
-extern struct ast_key *ast_key_get(char *key, int type);
-
-/*! Initialize keys (that is, retrieve pass codes for all private keys) */
-/*!
- * \param fd a file descriptor for I/O for passwords
- *
- */
-extern int ast_key_init(int fd);
+extern struct ast_key *(*ast_key_get)(const char *key, int type);
/*! Check the authenticity of a message signature using a given public key */
/*!
@@ -60,7 +53,7 @@ extern int ast_key_init(int fd);
* Returns 0 if the signature is valid, or -1 otherwise
*
*/
-extern int ast_check_signature(struct ast_key *key, char *msg, char *sig);
+extern int (*ast_check_signature)(struct ast_key *key, const char *msg, const char *sig);
/*! Check the authenticity of a message signature using a given public key */
/*!
@@ -71,7 +64,7 @@ extern int ast_check_signature(struct ast_key *key, char *msg, char *sig);
* Returns 0 if the signature is valid, or -1 otherwise
*
*/
-extern int ast_check_signature_bin(struct ast_key *key, char *msg, int msglen, unsigned char *sig);
+extern int (*ast_check_signature_bin)(struct ast_key *key, const char *msg, int msglen, const unsigned char *sig);
/*!
* \param key a private key to use to create the signature
@@ -82,7 +75,7 @@ extern int ast_check_signature_bin(struct ast_key *key, char *msg, int msglen, u
* Returns 0 on success or -1 on failure.
*
*/
-extern int ast_sign(struct ast_key *key, char *msg, char *sig);
+extern int (*ast_sign)(struct ast_key *key, char *msg, char *sig);
/*!
* \param key a private key to use to create the signature
* \param msg the message to sign
@@ -92,7 +85,7 @@ extern int ast_sign(struct ast_key *key, char *msg, char *sig);
* Returns 0 on success or -1 on failure.
*
*/
-extern int ast_sign_bin(struct ast_key *key, char *msg, int msglen, unsigned char *sig);
+extern int (*ast_sign_bin)(struct ast_key *key, const char *msg, int msglen, unsigned char *sig);
/*!
* \param key a private key to use to encrypt
@@ -104,7 +97,7 @@ extern int ast_sign_bin(struct ast_key *key, char *msg, int msglen, unsigned cha
* Returns length of encrypted data on success or -1 on failure.
*
*/
-extern int ast_encrypt_bin(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
+extern int (*ast_encrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
/*!
* \param key a private key to use to decrypt
@@ -116,7 +109,7 @@ extern int ast_encrypt_bin(unsigned char *dst, const unsigned char *src, int src
* Returns length of decrypted data on success or -1 on failure.
*
*/
-extern int ast_decrypt_bin(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
+extern int (*ast_decrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
#if defined(__cplusplus) || defined(c_plusplus)
}
#endif