Blame SOURCES/nss-lockcert-api-change.patch

294c78
# HG changeset patch
294c78
# User Franziskus Kiefer <franziskuskiefer@gmail.com>
294c78
# Date 1486546862 -3600
294c78
#      Wed Feb 08 10:41:02 2017 +0100
294c78
# Node ID 896e3eb3a79933a51886949c7adb67ef37b721c0
294c78
# Parent  a8d77070526320ad0edc7ba164ce97f10c4f7d94
294c78
Bug 1278965 - tsan race in CERTCertificate, r=wtc,ttaubert
294c78
294c78
diff --git a/lib/certdb/cert.h b/lib/certdb/cert.h
294c78
--- a/lib/certdb/cert.h
294c78
+++ b/lib/certdb/cert.h
294c78
@@ -1405,24 +1405,11 @@ void CERT_SetStatusConfig(CERTCertDBHand
294c78
 void CERT_LockCertRefCount(CERTCertificate *cert);
294c78
 
294c78
 /*
294c78
- * Free the cert reference count lock
294c78
+ * Release the cert reference count lock
294c78
  */
294c78
 void CERT_UnlockCertRefCount(CERTCertificate *cert);
294c78
 
294c78
 /*
294c78
- * Acquire the cert trust lock
294c78
- * There is currently one global lock for all certs, but I'm putting a cert
294c78
- * arg here so that it will be easy to make it per-cert in the future if
294c78
- * that turns out to be necessary.
294c78
- */
294c78
-void CERT_LockCertTrust(const CERTCertificate *cert);
294c78
-
294c78
-/*
294c78
- * Free the cert trust lock
294c78
- */
294c78
-void CERT_UnlockCertTrust(const CERTCertificate *cert);
294c78
-
294c78
-/*
294c78
  * Digest the cert's subject public key using the specified algorithm.
294c78
  * NOTE: this digests the value of the BIT STRING subjectPublicKey (excluding
294c78
  * the tag, length, and number of unused bits) rather than the whole
294c78
diff --git a/lib/certdb/certi.h b/lib/certdb/certi.h
294c78
--- a/lib/certdb/certi.h
294c78
+++ b/lib/certdb/certi.h
294c78
@@ -378,14 +378,27 @@ PRUint32 cert_CountDNSPatterns(CERTGener
294c78
 SECStatus cert_CheckLeafTrust(CERTCertificate* cert, SECCertUsage usage,
294c78
                               unsigned int* failedFlags, PRBool* isTrusted);
294c78
 
294c78
 /*
294c78
  * Acquire the cert temp/perm lock
294c78
  */
294c78
 void CERT_LockCertTempPerm(const CERTCertificate* cert);
294c78
 
294c78
 /*
294c78
  * Release the temp/perm lock
294c78
  */
294c78
 void CERT_UnlockCertTempPerm(const CERTCertificate* cert);
294c78
 
294c78
+/*
294c78
+ * Acquire the cert trust lock
294c78
+ * There is currently one global lock for all certs, but I'm putting a cert
294c78
+ * arg here so that it will be easy to make it per-cert in the future if
294c78
+ * that turns out to be necessary.
294c78
+ */
294c78
+void CERT_LockCertTrust(const CERTCertificate* cert);
294c78
+
294c78
+/*
294c78
+ * Release the cert trust lock
294c78
+ */
294c78
+void CERT_UnlockCertTrust(const CERTCertificate* cert);
294c78
+
294c78
 #endif /* _CERTI_H_ */