From 3af0c8d7b66df3aa5f1e83604a029f94f3545953 Mon Sep 17 00:00:00 2001
From: Christina Fu <cfu(a)redhat.com>
Date: Thu, 30 Jun 2016 17:02:11 -0700
Subject: Resolves: rhbz #1221295
* Bugzilla Bug #1221295 - jss fails to decode EncryptedKey >> EnvelopedData
(cfu for roysjosh(a)gmail.com)
---
jss-crmf-envelopedData.patch | 33 +++++++++++++++++++++++++++++++++
jss.spec | 8 +++++++-
2 files changed, 40 insertions(+), 1 deletion(-)
create mode 100644 jss-crmf-envelopedData.patch
diff --git a/jss-crmf-envelopedData.patch b/jss-crmf-envelopedData.patch
new file mode 100644
index 0000000..13c21d7
--- /dev/null
+++ b/jss-crmf-envelopedData.patch
@@ -0,0 +1,33 @@
+diff -up
jss-4.2.6/mozilla/security/jss/org/mozilla/jss/pkix/crmf/EncryptedKey.java.roysjosh
jss-4.2.6/mozilla/security/jss/org/mozilla/jss/pkix/crmf/EncryptedKey.java
+---
jss-4.2.6/mozilla/security/jss/org/mozilla/jss/pkix/crmf/EncryptedKey.java.roysjosh 2016-06-24
14:51:48.929122053 -0700
++++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/pkix/crmf/EncryptedKey.java 2016-06-24
14:52:29.487027005 -0700
+@@ -127,7 +127,8 @@ public class EncryptedKey implements ASN
+ } else {
+ Assert._assert(type == ENVELOPED_DATA);
+ Assert._assert(envelopedData != null);
+- envelopedData.encode(implicitTag, ostream);
++ EXPLICIT explicit = new EXPLICIT( new Tag(0), envelopedData );
++ explicit.encode(tag, ostream);
+ }
+ }
+
+@@ -147,7 +148,9 @@ public class EncryptedKey implements ASN
+ choicet = new CHOICE.Template();
+
+ choicet.addElement( EncryptedValue.getTemplate() );
+- choicet.addElement( new Tag(0), ANY.getTemplate() );
++ choicet.addElement( new EXPLICIT.Template(
++ new Tag(0),
++ ANY.getTemplate() ));
+ }
+
+ public boolean tagMatch(Tag tag) {
+@@ -164,7 +167,7 @@ public class EncryptedKey implements ASN
+ return new EncryptedKey( (EncryptedValue) choice.getValue() );
+ } else {
+ Assert._assert( choice.getTag().equals(new Tag(0)) );
+- return new EncryptedKey( (ANY) choice.getValue() );
++ return new EncryptedKey( (ANY) ((EXPLICIT)
choice.getValue()).getContent() );
+ }
+
+ } catch(InvalidBERException e) {
diff --git a/jss.spec b/jss.spec
index b44a83f..cc15c1c 100644
--- a/jss.spec
+++ b/jss.spec
@@ -1,6 +1,6 @@
Name: jss
Version: 4.2.6
-Release: 40%{?dist}
+Release: 41%{?dist}
Summary: Java Security Services (JSS)
Group: System Environment/Libraries
@@ -52,6 +52,7 @@ Patch27: jss-Fixed-build-failures.patch
Patch28: jss-VerifyCertificate-enhancement.patch
Patch29: jss-lunasaUnwrap.patch
Patch30: jss-symkey-enhancements.patch
+Patch31: jss-crmf-envelopedData.patch
%description
@@ -99,6 +100,7 @@ This package contains the API documentation for JSS.
%patch28 -p1
%patch29 -p1
%patch30 -p1
+%patch31 -p1
%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
@@ -203,6 +205,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Jun 24 2016 Christina Fu <cfu(a)redhat.com> - 4.2.6-41
+- Bugzilla 1221295 jss fails to decode EncryptedKey >> EnvelopedData
+ (cfu for roysjosh(a)gmail.com)
+
* Thu May 19 2016 Christina Fu <cfu(a)redhat.com> - 4.2.6-40
- Bugzilla 1074208 - pass up exact JSS certificate validation errors from NSS
(edewata)
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/jss.git/commit/?h=master&id=3af0c8...