Resolves: rhbz#1238450

* Bugzilla Bug #1238450 - UnsatisfiedLinkError on Windows (cfu)
* make it compile on Windows platforms (cfu for nhosoi)
This commit is contained in:
Christina Fu 2016-08-09 12:10:56 -07:00
parent 3af0c8d7b6
commit 678c5be533
3 changed files with 81 additions and 6 deletions

View File

@ -0,0 +1,32 @@
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/ssl/SSLSocket.c.cfu jss-4.2.6/mozilla/security/jss/org/mozilla/jss/ssl/SSLSocket.c
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/ssl/SSLSocket.c.cfu 2015-04-23 13:25:45.104249135 -0700
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/ssl/SSLSocket.c 2015-04-23 13:39:29.958813779 -0700
@@ -49,10 +49,12 @@
#ifdef WINNT
#include <private/pprio.h>
+#define AF_INET6 23
#endif
#ifdef WIN32
#include <winsock.h>
+#define AF_INET6 23
#endif
@@ -66,6 +68,7 @@ Java_org_mozilla_jss_ssl_SSLSocket_setSS
{
SECStatus status;
SSLVersionRange vrange;
+ SSLVersionRange supported_range;
if (ssl_variant <0 || ssl_variant >= JSSL_enums_size||
min <0 || min >= JSSL_enums_size ||
@@ -80,7 +83,6 @@ Java_org_mozilla_jss_ssl_SSLSocket_setSS
vrange.max = JSSL_enums[max];
/* get supported range */
- SSLVersionRange supported_range;
status = SSL_VersionRangeGetSupported(JSSL_enums[ssl_variant],
&supported_range);
if( status != SECSuccess ) {

View File

@ -0,0 +1,30 @@
diff -up jss-4.2.6/mozilla/security/jss/org/mozilla/jss/CryptoManager.java.cfu jss-4.2.6/mozilla/security/jss/org/mozilla/jss/CryptoManager.java
--- jss-4.2.6/mozilla/security/jss/org/mozilla/jss/CryptoManager.java.cfu 2015-07-08 12:02:13.192000000 +0200
+++ jss-4.2.6/mozilla/security/jss/org/mozilla/jss/CryptoManager.java 2015-07-08 12:04:56.213000000 +0200
@@ -1404,17 +1404,23 @@ public final class CryptoManager impleme
synchronized static void loadNativeLibraries()
{
if( ! mNativeLibrariesLoaded ) {
- try {
+ try { // 64 bit rhel/fedora
System.load( "/usr/lib64/jss/libjss4.so" );
Debug.trace(Debug.VERBOSE, "jss library loaded");
mNativeLibrariesLoaded = true;
} catch( UnsatisfiedLinkError e ) {
- try {
+ try { // 32 bit rhel/fedora
System.load( "/usr/lib/jss/libjss4.so" );
Debug.trace(Debug.VERBOSE, "jss library loaded");
mNativeLibrariesLoaded = true;
} catch( UnsatisfiedLinkError f ) {
- Debug.trace(Debug.VERBOSE, "jss library load failed");
+ try {// possibly other platforms
+ System.loadLibrary( "jss4" );
+ Debug.trace(Debug.VERBOSE, "jss library loaded");
+ mNativeLibrariesLoaded = true;
+ } catch( UnsatisfiedLinkError g ) {
+ Debug.trace(Debug.VERBOSE, "jss library load failed");
+ }
}
}
}

View File

@ -1,6 +1,6 @@
Name: jss
Version: 4.2.6
Release: 41%{?dist}
Release: 42%{?dist}
Summary: Java Security Services (JSS)
Group: System Environment/Libraries
@ -19,6 +19,9 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: nss-devel >= 3.21.0
BuildRequires: nspr-devel >= 4.11.0
BuildRequires: java-devel
%if 0%{?fedora} >= 25
BuildRequires: perl
%endif
Requires: java-headless
Requires: nss >= 3.21.0
@ -48,11 +51,13 @@ Patch23: jss-fixed-build-issue-on-F17-or-newer.patch
Patch24: jss-SHA-OID-fix.patch
Patch25: jss-RC4-strengh-verify.patch
Patch26: jss-support-TLS1_1-TLS1_2.patch
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
Patch27: jss-WindowsCompileFix.patch
Patch28: jss-WindowsLoadLibrary.patch
Patch29: jss-Fixed-build-failures.patch
Patch30: jss-VerifyCertificate-enhancement.patch
Patch31: jss-lunasaUnwrap.patch
Patch32: jss-symkey-enhancements.patch
Patch33: jss-crmf-envelopedData.patch
%description
@ -101,6 +106,8 @@ This package contains the API documentation for JSS.
%patch29 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%build
[ -z "$JAVA_HOME" ] && export JAVA_HOME=%{_jvmdir}/java
@ -205,6 +212,12 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Tue Aug 9 2016 Christina Fu <cfu@redhat.com> - 4.2.6-42
- Sync up patches from both Fedora and RHEL; adding two patches
(cfu, edewata, mharmsen) from RHEL:
- Bugzilla Bug #1238450 - UnsatisfiedLinkError on Windows (cfu)
- make it compile on Windows platforms (cfu for nhosoi)
* Fri Jun 24 2016 Christina Fu <cfu@redhat.com> - 4.2.6-41
- Bugzilla 1221295 jss fails to decode EncryptedKey >> EnvelopedData
(cfu for roysjosh@gmail.com)