Browse Source

support openssl 0.9.6

David Rose 16 years ago
parent
commit
db0d629076
1 changed files with 7 additions and 2 deletions
  1. 7 2
      panda/src/express/multifile.cxx

+ 7 - 2
panda/src/express/multifile.cxx

@@ -2355,8 +2355,13 @@ check_signatures() {
     CertChain chain;
     CertChain chain;
     EVP_PKEY *pkey = NULL;
     EVP_PKEY *pkey = NULL;
     if (!buffer.empty()) {
     if (!buffer.empty()) {
-      const unsigned char *bp = (const unsigned char *)&buffer[0];
-      const unsigned char *bp_end = bp + buffer.size();
+#ifdef OPENSSL_097
+      const unsigned char *bp, *bp_end;
+#else
+      unsigned char *bp, *bp_end;
+#endif
+      bp = (unsigned char *)&buffer[0];
+      bp_end = bp + buffer.size();
       X509 *x509 = d2i_X509(NULL, &bp, bp_end - bp);
       X509 *x509 = d2i_X509(NULL, &bp, bp_end - bp);
       while (num_certs > 0 && x509 != NULL) {
       while (num_certs > 0 && x509 != NULL) {
         chain.push_back(CertRecord(x509));
         chain.push_back(CertRecord(x509));