diff --git a/ambiguous-reseed.patch b/ambiguous-reseed.patch
new file mode 100644
index 0000000..241fd2a
--- /dev/null
+++ b/ambiguous-reseed.patch
@@ -0,0 +1,11 @@
+--- bcprov-jdk15on-158/src/org/bouncycastle/jcajce/provider/drbg/DRBG.java 2017-09-15 09:12:43.611044610 +0200
++++ bcprov-jdk15on-158/src/org/bouncycastle/jcajce/provider/drbg/DRBG.java 2017-09-15 09:13:03.059044684 +0200
+@@ -259,7 +259,7 @@
+ if (seedAvailable.getAndSet(false))
+ {
+ samples.set(0);
+- drbg.reseed(null);
++ drbg.reseed((byte[])null);
+ }
+ }
+
diff --git a/bcprov-jdk15on-1.54.pom b/bcprov-jdk15on-1.58.pom
similarity index 89%
rename from bcprov-jdk15on-1.54.pom
rename to bcprov-jdk15on-1.58.pom
index df0bb48..2a204fc 100644
--- a/bcprov-jdk15on-1.54.pom
+++ b/bcprov-jdk15on-1.58.pom
@@ -5,7 +5,7 @@
bcprov-jdk15on
jar
Bouncy Castle Provider
- 1.54
+ 1.58
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for JDK 1.5 to JDK 1.8.
http://www.bouncycastle.org/java.html
@@ -19,8 +19,8 @@
https://github.com/bcgit/bc-java
- JIRA
- http://www.bouncycastle.org/jira/secure/Dashboard.jspa
+ GitHub
+ https://github.com/bcgit/bc-java/issues
diff --git a/bcprov-jdk15on-154.tar.gz b/bcprov-jdk15on-154.tar.gz
deleted file mode 100644
index b6a14c7..0000000
--- a/bcprov-jdk15on-154.tar.gz
+++ /dev/null
@@ -1,3 +0,0 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:6b8fb02c1bca77472459e81382152da87d96ba468f8dcb876211938910ad7146
-size 6903567
diff --git a/bcprov-jdk15on-158.tar.gz b/bcprov-jdk15on-158.tar.gz
new file mode 100644
index 0000000..39168a6
--- /dev/null
+++ b/bcprov-jdk15on-158.tar.gz
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:76b8ea38902921c6c09b88236c9d348ff22381159fe70922d26f2f4a4d7af3c1
+size 8635229
diff --git a/bouncycastle.changes b/bouncycastle.changes
index 916204b..809c3cd 100644
--- a/bouncycastle.changes
+++ b/bouncycastle.changes
@@ -1,3 +1,11 @@
+-------------------------------------------------------------------
+Fri Sep 15 07:25:45 UTC 2017 - fstrba@suse.com
+
+- Version update to 1.58
+- Added patch:
+ * ambiguous-reseed.patch
+ + Upstream fix for an ambiguous overload
+
-------------------------------------------------------------------
Thu Sep 7 13:04:44 UTC 2017 - fstrba@suse.com
diff --git a/bouncycastle.spec b/bouncycastle.spec
index 4521a61..972cafd 100644
--- a/bouncycastle.spec
+++ b/bouncycastle.spec
@@ -16,8 +16,8 @@
#
-%define ver 1.54
-%define shortver 154
+%define ver 1.58
+%define shortver 158
%define archivever jdk15on-%{shortver}
%define classname org.bouncycastle.jce.provider.BouncyCastleProvider
Name: bouncycastle
@@ -29,7 +29,8 @@ Group: Development/Libraries/Java
Url: http://www.bouncycastle.org/
Source0: http://www.bouncycastle.org/download/bcprov-%{archivever}.tar.gz
Source1: http://repo1.maven.org/maven2/org/bouncycastle/bcprov-jdk15on/%{ver}/bcprov-jdk15on-%{ver}.pom
-BuildRequires: java-devel
+Patch0: ambiguous-reseed.patch
+BuildRequires: java-devel >= 1.6
BuildRequires: javapackages-local
BuildRequires: javapackages-tools
BuildRequires: junit
@@ -38,7 +39,6 @@ BuildRequires: mozilla-nss
BuildRequires: unzip
Requires: java
Provides: bcprov = %{version}-%{release}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
@@ -66,6 +66,8 @@ find . -type f -name "*.jar" -exec rm -f {} \;
mkdir src
unzip -qq src.zip -d src/
+%patch0 -p1
+
%build
pushd src
export CLASSPATH=$(build-classpath junit)
@@ -163,7 +165,6 @@ if [ $1 -eq 0 ] ; then
fi
%files
-%defattr(0644,root,root,0755)
%doc *.html
%{_javadir}/bcprov.jar
%{_javadir}/bcprov-%{version}.jar
@@ -173,7 +174,6 @@ fi
%{_datadir}/maven-metadata/%{name}.xml
%files javadoc
-%defattr(0644,root,root,0755)
%{_javadocdir}/%{name}/
%changelog