From 0cc42172eaa84e885327ee399633c46a2e272998 Mon Sep 17 00:00:00 2001 From: Andreas Fitzek Date: Fri, 26 Sep 2014 12:37:22 +0200 Subject: ECCelerate moved to last position for security providers, because of TLS bug --- .../src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api') diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java index a96d6690..92b690cf 100644 --- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java +++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java @@ -70,7 +70,12 @@ public class PdfAsFactory { if (Security.getProvider(name) == null) { // register IAIK provider at first position try { - Security.insertProviderAt(provider, position); + if(position < 0) { + // add provider add default position. + Security.addProvider(provider); + } else { + Security.insertProviderAt(provider, position); + } } catch (SecurityException e) { logger.info("Failed to register required security Provider.", e); } @@ -97,7 +102,8 @@ public class PdfAsFactory { //IAIK.addAsProvider(); //ECCelerate.addAsProvider(); registerProvider(new IAIK(), 1); - registerProvider(new ECCelerate(), 2); + registerProvider(new ECCelerate(), -1); + //registerProvider(new ECCelerate(), 2); System.out .println("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"); -- cgit v1.2.3