mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
c1aaa2b5f9
--HG-- extra : source : f37f4a6ba90b8add8792fa15812ba25d176b96b7
34 lines
1.2 KiB
Diff
34 lines
1.2 KiB
Diff
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) {
|