aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-09-26 12:37:22 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-09-26 12:37:22 +0200
commit0cc42172eaa84e885327ee399633c46a2e272998 (patch)
tree435bc9d537eec7245f0bbe073dee7b96900e7fc7
parent023d1b5d7046b6a3062e90a4628f09a50a876f1b (diff)
downloadpdf-as-4-0cc42172eaa84e885327ee399633c46a2e272998.tar.gz
pdf-as-4-0cc42172eaa84e885327ee399633c46a2e272998.tar.bz2
pdf-as-4-0cc42172eaa84e885327ee399633c46a2e272998.zip
ECCelerate moved to last position for security providers, because of TLS bug
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java10
1 files changed, 8 insertions, 2 deletions
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("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");