From b6a94f4a16d88fe0f6ab5df653b22826f5a1d248acc5a089a72f3017928406ab Mon Sep 17 00:00:00 2001 From: Marguerite Su Date: Wed, 4 Mar 2015 10:36:21 +0000 Subject: [PATCH] Accepting request 288198 from home:Mailaender:branches:Mono:Factory required to get nuget to work again OBS-URL: https://build.opensuse.org/request/show/288198 OBS-URL: https://build.opensuse.org/package/show/Mono:Factory/mono-core?expand=0&rev=141 --- X509Certificate-workaround.patch | 39 ++++++++++++++++++++++++++++++++ mono-core.changes | 5 ++++ mono-core.spec | 14 ++++++++---- 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 X509Certificate-workaround.patch diff --git a/X509Certificate-workaround.patch b/X509Certificate-workaround.patch new file mode 100644 index 0000000..fa18b58 --- /dev/null +++ b/X509Certificate-workaround.patch @@ -0,0 +1,39 @@ +From afcb0baec2182503ed8de016bd6225cbb1c74191 Mon Sep 17 00:00:00 2001 +From: Jo Shields +Date: Mon, 19 Jan 2015 14:32:22 +0000 +Subject: [PATCH] Workaround for X509Certificate.RSA throwing an unhandled + exception in ASN1 parsing of certificates with ECC public keys only. + +--- + mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs b/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs +index 11be419..da39f9a 100644 +--- a/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs ++++ b/mcs/class/Mono.Security/Mono.Security.X509/X509Certificate.cs +@@ -247,7 +247,7 @@ private byte[] GetUnsignedBigInteger (byte[] integer) + if (m_keyalgoparams == null) + throw new CryptographicException ("Missing key algorithm parameters."); + +- if (_dsa == null) { ++ if (_dsa == null && m_keyalgo == "1.2.840.10040.4.1") { + DSAParameters dsaParams = new DSAParameters (); + // for DSA m_publickey contains 1 ASN.1 integer - Y + ASN1 pubkey = new ASN1 (m_publickey); +@@ -327,7 +327,7 @@ private byte[] GetUnsignedBigInteger (byte[] integer) + + public virtual RSA RSA { + get { +- if (_rsa == null) { ++ if (_rsa == null && m_keyalgo == "1.2.840.113549.1.1.1") { + RSAParameters rsaParams = new RSAParameters (); + // for RSA m_publickey contains 2 ASN.1 integers + // the modulus and the public exponent +@@ -560,4 +560,4 @@ static byte[] PEM (string type, byte[] data) + return Convert.FromBase64String (base64); + } + } +-} +\ No newline at end of file ++} diff --git a/mono-core.changes b/mono-core.changes index 5f30254..6a3e727 100644 --- a/mono-core.changes +++ b/mono-core.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Feb 28 10:35:11 UTC 2015 - mailaender@opensuse.org + +- add X509Certificate-workaround.patch which fixes bxc#21298 + ------------------------------------------------------------------- Sat Jan 24 09:41:00 UTC 2015 - mailaender@opensuse.org diff --git a/mono-core.spec b/mono-core.spec index d432ee9..ead1cd8 100644 --- a/mono-core.spec +++ b/mono-core.spec @@ -42,6 +42,8 @@ Patch9: mono-core-ppc64le-callreg.diff Patch10: mono-3.x-keyboards.resources-cp_r.patch # PATCH-FIX-UPSTREAM https://github.com/mono/mono/commit/b27d0248772e0b3288fba4f7328bfea1a6693689.patch Patch11: gc-64bit-portability-warning.patch +# PATCH-FIX-UPSTREAM https://github.com/mono/mono/pull/1514.patch +Patch12: X509Certificate-workaround.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: bison @@ -110,6 +112,7 @@ technologies that have been submitted to the ECMA for standardization. %endif %patch10 -p1 %patch11 -p1 +%patch12 -p1 %build ./autogen.sh @@ -1145,10 +1148,11 @@ Requires: mono-core = %{version} NUnit is a unit-testing framework for all .Net languages. Initially ported from JUnit, the current release, version 2.2, is the fourth major release of this Unit based unit testing tool for Microsoft .NET. -It is written entirely in C# and has been completely redesigned to -take advantage of many .NET language features, for example -custom attributes and other reflection related capabilities. NUnit -brings xUnit to all .NET languages. +It is written entirely in C# and has been completely redesigned to +take advantage of many .NET language features, for example custom +attributes and other reflection related capabilities. + +NUnit brings xUnit to all .NET languages. %files -n mono-nunit %defattr(-, root, root) @@ -1187,10 +1191,10 @@ brings xUnit to all .NET languages. Summary: Mono development tools License: LGPL-2.1 Group: Development/Languages/Mono +Requires: ca-certificates Requires: libgdiplus-devel Requires: mono-core = %{version} # Required because they are referenced by .pc files -Requires: ca-certificates Requires: mono-data = %{version} Requires: mono-data-oracle = %{version} Requires: mono-extras = %{version}