mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 832942: work around an ARMv6 code generation bug in gcc 4.6. r=wtc.
--HG-- extra : source : f37f4a6ba90b8add8792fa15812ba25d176b96b7
This commit is contained in:
parent
cec42efb23
commit
422896c51f
@ -1894,7 +1894,18 @@ sftk_mkPrivKey(SFTKObject *object, CK_KEY_TYPE key_type, CK_RV *crvp)
|
||||
}
|
||||
rv = DER_SetUInteger(privKey->arena, &privKey->u.ec.version,
|
||||
NSSLOWKEY_EC_PRIVATE_KEY_VERSION);
|
||||
if (rv != SECSuccess) crv = CKR_HOST_MEMORY;
|
||||
if (rv != SECSuccess) {
|
||||
crv = CKR_HOST_MEMORY;
|
||||
/* The following ifdef is needed for Linux arm distros and
|
||||
* Android as gcc 4.6 has a bug when targeting arm (but not
|
||||
* thumb). The bug has been fixed in gcc 4.7.
|
||||
* http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56561
|
||||
*/
|
||||
#if defined (__arm__) && !defined(__thumb__) && defined (__GNUC__)
|
||||
*crvp = CKR_HOST_MEMORY;
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
#endif /* NSS_ENABLE_ECC */
|
||||
|
||||
|
@ -4,3 +4,4 @@ on top of the NSS release.
|
||||
bug-834091.patch: Add SEC_PKCS7VerifyDetachedSignatureAtTime, which is needed
|
||||
for B2G 1.0. This patch is probably going to be modified
|
||||
before it can land in upstream NSS.
|
||||
bug-832942.patch: work around an ARMv6 code generation bug in gcc 4.6.
|
33
security/patches/bug-832942.patch
Normal file
33
security/patches/bug-832942.patch
Normal file
@ -0,0 +1,33 @@
|
||||
diff --git a/lib/softoken/pkcs11.c b/lib/softoken/pkcs11.c
|
||||
--- a/lib/softoken/pkcs11.c
|
||||
+++ b/lib/softoken/pkcs11.c
|
||||
@@ -1889,17 +1889,28 @@ sftk_mkPrivKey(SFTKObject *object, CK_KE
|
||||
crv = sftk_Attribute2SSecItem(arena, &privKey->u.ec.publicValue,
|
||||
object, CKA_NETSCAPE_DB);
|
||||
if (crv != CKR_OK) break;
|
||||
/* privKey was zero'd so public value is already set to NULL, 0
|
||||
* if we don't set it explicitly */
|
||||
}
|
||||
rv = DER_SetUInteger(privKey->arena, &privKey->u.ec.version,
|
||||
NSSLOWKEY_EC_PRIVATE_KEY_VERSION);
|
||||
- if (rv != SECSuccess) crv = CKR_HOST_MEMORY;
|
||||
+ if (rv != SECSuccess) {
|
||||
+ crv = CKR_HOST_MEMORY;
|
||||
+ /* The following ifdef is needed for Linux arm distros and
|
||||
+ * Android as gcc 4.6 has a bug when targeting arm (but not
|
||||
+ * thumb). The bug has been fixed in gcc 4.7.
|
||||
+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56561
|
||||
+ */
|
||||
+#if defined (__arm__) && !defined(__thumb__) && defined (__GNUC__)
|
||||
+ *crvp = CKR_HOST_MEMORY;
|
||||
+ break;
|
||||
+#endif
|
||||
+ }
|
||||
break;
|
||||
#endif /* NSS_ENABLE_ECC */
|
||||
|
||||
default:
|
||||
crv = CKR_KEY_TYPE_INCONSISTENT;
|
||||
break;
|
||||
}
|
||||
if (crv == CKR_OK && itemTemplateCount != 0) {
|
Loading…
Reference in New Issue
Block a user