summaryrefslogtreecommitdiffstats
path: root/base/crypto
diff options
context:
space:
mode:
Diffstat (limited to 'base/crypto')
-rw-r--r--base/crypto/rsa_private_key.h11
-rw-r--r--base/crypto/rsa_private_key_nss.cc4
-rw-r--r--base/crypto/signature_creator.h5
-rw-r--r--base/crypto/signature_creator_nss.cc4
4 files changed, 17 insertions, 7 deletions
diff --git a/base/crypto/rsa_private_key.h b/base/crypto/rsa_private_key.h
index 3f07188..5ce3839 100644
--- a/base/crypto/rsa_private_key.h
+++ b/base/crypto/rsa_private_key.h
@@ -8,8 +8,9 @@
#include "build/build_config.h"
#if defined(USE_NSS)
-#include <cryptoht.h>
-#include <keythi.h>
+// Forward declaration.
+struct SECKEYPrivateKeyStr;
+struct SECKEYPublicKeyStr;
#elif defined(OS_MACOSX)
#include <Security/cssm.h>
#elif defined(OS_WIN)
@@ -166,7 +167,7 @@ class RSAPrivateKey {
~RSAPrivateKey();
#if defined(USE_NSS)
- SECKEYPrivateKey* key() { return key_; }
+ SECKEYPrivateKeyStr* key() { return key_; }
#elif defined(OS_WIN)
HCRYPTPROV provider() { return provider_; }
HCRYPTKEY key() { return key_; }
@@ -187,8 +188,8 @@ private:
RSAPrivateKey();
#if defined(USE_NSS)
- SECKEYPrivateKey* key_;
- SECKEYPublicKey* public_key_;
+ SECKEYPrivateKeyStr* key_;
+ SECKEYPublicKeyStr* public_key_;
#elif defined(OS_WIN)
bool InitProvider();
diff --git a/base/crypto/rsa_private_key_nss.cc b/base/crypto/rsa_private_key_nss.cc
index 7e10b36..e48a195 100644
--- a/base/crypto/rsa_private_key_nss.cc
+++ b/base/crypto/rsa_private_key_nss.cc
@@ -4,9 +4,13 @@
#include "base/crypto/rsa_private_key.h"
+// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424
+// until NSS 3.12.2 comes out and we update to it.
+#define Lock FOO_NSS_Lock
#include <cryptohi.h>
#include <keyhi.h>
#include <pk11pub.h>
+#undef Lock
#include <iostream>
#include <list>
diff --git a/base/crypto/signature_creator.h b/base/crypto/signature_creator.h
index 97a6e79..a2d5cf6 100644
--- a/base/crypto/signature_creator.h
+++ b/base/crypto/signature_creator.h
@@ -8,7 +8,8 @@
#include "build/build_config.h"
#if defined(USE_NSS)
-#include <cryptoht.h>
+// Forward declaration.
+struct SGNContextStr;
#elif defined(OS_MACOSX)
#include <Security/cssm.h>
#elif defined(OS_WIN)
@@ -46,7 +47,7 @@ class SignatureCreator {
RSAPrivateKey* key_;
#if defined(USE_NSS)
- SGNContext* sign_context_;
+ SGNContextStr* sign_context_;
#elif defined(OS_MACOSX)
CSSM_CSP_HANDLE csp_handle_;
CSSM_CC_HANDLE sig_handle_;
diff --git a/base/crypto/signature_creator_nss.cc b/base/crypto/signature_creator_nss.cc
index e0de4b7..3ca4ff7 100644
--- a/base/crypto/signature_creator_nss.cc
+++ b/base/crypto/signature_creator_nss.cc
@@ -4,9 +4,13 @@
#include "base/crypto/signature_creator.h"
+// Work around https://bugzilla.mozilla.org/show_bug.cgi?id=455424
+// until NSS 3.12.2 comes out and we update to it.
+#define Lock FOO_NSS_Lock
#include <cryptohi.h>
#include <keyhi.h>
#include <stdlib.h>
+#undef Lock
#include "base/logging.h"
#include "base/nss_init.h"