[hipl-commit] [trunk] Rev 4287: Remove BROKEN_SSL_CONST definition hack.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Thu, 15 Apr 2010 18:45:55 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 15/04/2010 at 18:45:55
Revision: 4287
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Remove BROKEN_SSL_CONST definition hack.

Modified:
  M  hipd/cert.c
  M  hipd/cert.h
  M  lib/core/certtools.c

=== modified file 'hipd/cert.c'
--- hipd/cert.c 2010-04-13 15:52:03 +0000
+++ hipd/cert.c 2010-04-15 15:45:33 +0000
@@ -1091,7 +1091,7 @@
     _HIP_DEBUG("DER length %d\n", verify.der_len);
 
     vessel = &der_cert;
-    HIP_IFEL(((cert = d2i_X509(NULL, (BROKEN_SSL_CONST unsigned char **) 
vessel, verify.der_len)) == NULL), -1,
+    HIP_IFEL(((cert = d2i_X509(NULL, (const unsigned char **) vessel, 
verify.der_len)) == NULL), -1,
              "Failed to convert cert from DER to internal format\n");
     /*
      * HIP_IFEL(!X509_print_fp(stdout, cert), -1,

=== modified file 'hipd/cert.h'
--- hipd/cert.h 2010-04-08 11:05:16 +0000
+++ hipd/cert.h 2010-04-15 15:45:33 +0000
@@ -46,7 +46,4 @@
 int hip_cert_hostid2rsa(struct hip_host_id_priv *, RSA *);
 int hip_cert_hostid2dsa(struct hip_host_id_priv *, DSA *);
 
-/** ugly hack for supressing warnings in broken environments */
-#define BROKEN_SSL_CONST const
-
 #endif /* HIP_HIPD_CERT_H */

=== modified file 'lib/core/certtools.c'
--- lib/core/certtools.c        2010-04-09 16:24:44 +0000
+++ lib/core/certtools.c        2010-04-15 15:45:33 +0000
@@ -825,7 +825,7 @@
     _HIP_HEXDUMP("DER:\n", der, length);
     _HIP_DEBUG("DER length %d\n", length);
 
-    HIP_IFEL(((cert = d2i_X509(NULL, (BROKEN_SSL_CONST unsigned char **) &der, 
length)) == NULL), -1,
+    HIP_IFEL(((cert = d2i_X509(NULL, (const unsigned char **) &der, length)) 
== NULL), -1,
              "Failed to convert cert from DER to internal format\n");
 out_err:
     if (err == -1) {

Other related posts:

  • » [hipl-commit] [trunk] Rev 4287: Remove BROKEN_SSL_CONST definition hack. - Diego Biurrun