[or-cvs] Jump through a hoop, suppress a warning

Nick Mathewson nickm at seul.org
Tue Mar 30 22:42:28 UTC 2004


Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv31973/src/common

Modified Files:
	crypto.c 
Log Message:
Jump through a hoop, suppress a warning

Index: crypto.c
===================================================================
RCS file: /home/or/cvsroot/src/common/crypto.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- crypto.c	30 Mar 2004 19:47:32 -0000	1.58
+++ crypto.c	30 Mar 2004 22:42:26 -0000	1.59
@@ -664,7 +664,14 @@
 crypto_pk_env_t *crypto_pk_asn1_decode(const char *str, int len)
 {
   RSA *rsa;
+  /* This ifdef suppresses a type warning.  Take out the first case once
+   * everybody is using openssl 0.9.7 or later.
+   */
+#if OPENSSL_VERSION_NUMBER < 0x00907000l
+  rsa = d2i_RSAPublicKey(NULL, (unsigned char**)&str, len);
+#else
   rsa = d2i_RSAPublicKey(NULL, (const unsigned char**)&str, len);
+#endif
   if (!rsa)
     return NULL; /* XXXX log openssl error */
   return _crypto_new_pk_env_rsa(rsa);



More information about the tor-commits mailing list