diff rsa.c @ 198:65585699d980

* add a "label" argument to printhex() * make some vars static in random.c
author Matt Johnston <matt@ucc.asn.au>
date Tue, 10 May 2005 17:02:05 +0000
parents c9483550701b
children ea9277442ef2
line wrap: on
line diff
--- a/rsa.c	Tue May 10 17:01:16 2005 +0000
+++ b/rsa.c	Tue May 10 17:02:05 2005 +0000
@@ -333,7 +333,7 @@
 	mp_clear(&rsa_s);
 
 #if defined(DEBUG_RSA) && defined(DEBUG_TRACE)
-	printhex(buf->data, buf->len);
+	printhex("RSA sig", buf->data, buf->len);
 #endif
 	
 
@@ -357,10 +357,11 @@
 		mp_int * rsa_em) {
 
 	/* ASN1 designator (including the 0x00 preceding) */
-	const char rsa_asn1_magic[] = 
+	const unsigned char rsa_asn1_magic[] = 
 		{0x00, 0x30, 0x21, 0x30, 0x09, 0x06, 0x05, 0x2b, 
 		 0x0e, 0x03, 0x02, 0x1a, 0x05, 0x00, 0x04, 0x14};
-#define RSA_ASN1_MAGIC_LEN 16
+	const unsigned int RSA_ASN1_MAGIC_LEN = 16;
+
 	buffer * rsa_EM = NULL;
 	hash_state hs;
 	unsigned int nsize;