diff rsa.h @ 586:b50f0107e505

Rename rsa_key to dropbear_rsa_key (and same for dss too) so we don't conflict with libtomcrypt.
author Matt Johnston <matt@ucc.asn.au>
date Wed, 21 Jul 2010 12:55:25 +0000
parents 0442c18da5c9
children 2b1bb792cd4d f336d232fc63
line wrap: on
line diff
--- a/rsa.h	Wed Jul 21 12:38:46 2010 +0000
+++ b/rsa.h	Wed Jul 21 12:55:25 2010 +0000
@@ -32,7 +32,7 @@
 
 #define RSA_SIGNATURE_SIZE 4+7+4+40
 
-struct RSA_key {
+typedef struct {
 
 	mp_int* n;
 	mp_int* e;
@@ -41,21 +41,19 @@
 	mp_int* p;
 	mp_int* q;
 
-};
+} dropbear_rsa_key;
 
-typedef struct RSA_key rsa_key;
-
-void buf_put_rsa_sign(buffer* buf, rsa_key *key, const unsigned char* data,
+void buf_put_rsa_sign(buffer* buf, dropbear_rsa_key *key, const unsigned char* data,
 		unsigned int len);
 #ifdef DROPBEAR_SIGNKEY_VERIFY
-int buf_rsa_verify(buffer * buf, rsa_key *key, const unsigned char* data,
+int buf_rsa_verify(buffer * buf, dropbear_rsa_key *key, const unsigned char* data,
 		unsigned int len);
 #endif
-int buf_get_rsa_pub_key(buffer* buf, rsa_key *key);
-int buf_get_rsa_priv_key(buffer* buf, rsa_key *key);
-void buf_put_rsa_pub_key(buffer* buf, rsa_key *key);
-void buf_put_rsa_priv_key(buffer* buf, rsa_key *key);
-void rsa_key_free(rsa_key *key);
+int buf_get_rsa_pub_key(buffer* buf, dropbear_rsa_key *key);
+int buf_get_rsa_priv_key(buffer* buf, dropbear_rsa_key *key);
+void buf_put_rsa_pub_key(buffer* buf, dropbear_rsa_key *key);
+void buf_put_rsa_priv_key(buffer* buf, dropbear_rsa_key *key);
+void rsa_key_free(dropbear_rsa_key *key);
 
 #endif /* DROPBEAR_RSA */