Commit 0d83390f authored by wannes's avatar wannes
Browse files

Update to BC 1.54

parent 58764de7
......@@ -46,17 +46,17 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpg-jdk15on</artifactId>
<version>1.50</version>
<version>1.54</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.50</version>
<version>1.54</version>
</dependency>
<dependency>
<groupId>be.fedict.eid-applet</groupId>
<artifactId>eid-applet-service</artifactId>
<version>1.2.2</version>
<version>1.2.6</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
......@@ -76,36 +76,36 @@
<artifactId>jetty-http</artifactId>
<groupId>org.eclipse.jetty</groupId>
<type>jar</type>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<artifactId>jetty-io</artifactId>
<groupId>org.eclipse.jetty</groupId>
<type>jar</type>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<artifactId>jetty-server</artifactId>
<groupId>org.eclipse.jetty</groupId>
<type>jar</type>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<artifactId>jetty-util</artifactId>
<groupId>org.eclipse.jetty</groupId>
<type>jar</type>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<artifactId>jetty-servlet</artifactId>
<groupId>org.eclipse.jetty</groupId>
<type>jar</type>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.http2</groupId>
<artifactId>http2-server</artifactId>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty.alpn</groupId>
......@@ -115,12 +115,12 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-alpn-server</artifactId>
<version>9.3.0.RC1</version>
<version>9.3.9.v20160517</version>
</dependency>
<dependency>
<groupId>com.googlecode.java-ipv6</groupId>
<artifactId>java-ipv6</artifactId>
<version>0.15</version>
<version>0.16</version>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
......@@ -130,7 +130,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.12</version>
<version>1.7.21</version>
</dependency>
<dependency>
<groupId>commons-daemon</groupId>
......@@ -150,17 +150,17 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.4-1201-jdbc41</version>
<version>9.4.1208.jre7</version>
</dependency>
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.8.10.1</version>
<version>3.8.11.2</version>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>2.8.0</version>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>net.killa.kept</groupId>
......@@ -187,17 +187,17 @@
<artifactId>bcmail-jdk15on</artifactId>
<groupId>org.bouncycastle</groupId>
<type>jar</type>
<version>1.50</version>
<version>1.54</version>
</dependency>
<dependency>
<groupId>dnsjava</groupId>
<artifactId>dnsjava</artifactId>
<version>2.1.6</version>
<version>2.1.7</version>
</dependency>
<dependency>
<groupId>org.mitre.dsmiley.httpproxy</groupId>
<artifactId>smiley-http-proxy-servlet</artifactId>
<version>1.6</version>
<version>1.7</version>
</dependency>
<dependency>
<groupId>net.kencochrane.raven</groupId>
......@@ -207,7 +207,7 @@
<dependency>
<groupId>com.unboundid</groupId>
<artifactId>unboundid-ldapsdk</artifactId>
<version>2.3.8</version>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.mindrot</groupId>
......
......@@ -9,7 +9,7 @@ import org.bouncycastle.cert.X509CertificateHolder;
import org.bouncycastle.cert.X509v3CertificateBuilder;
import org.bouncycastle.cert.jcajce.JcaX509CertificateHolder;
import org.bouncycastle.crypto.util.PrivateKeyFactory;
import org.bouncycastle.openssl.PEMWriter;
import org.bouncycastle.openssl.jcajce.JcaPEMWriter;
import org.bouncycastle.operator.ContentSigner;
import org.bouncycastle.operator.DefaultDigestAlgorithmIdentifierFinder;
import org.bouncycastle.operator.DefaultSignatureAlgorithmIdentifierFinder;
......@@ -84,17 +84,17 @@ public class CA {
KeyUsage keyUsage = new KeyUsage(KeyUsage.digitalSignature);
ExtendedKeyUsage eku = new ExtendedKeyUsage(KeyPurposeId.id_kp_clientAuth);
certgen.addExtension(X509Extension.basicConstraints, false, basicConstraints);
certgen.addExtension(X509Extensions.KeyUsage, false, keyUsage);
certgen.addExtension(X509Extension.extendedKeyUsage, false, eku);
certgen.addExtension(Extension.basicConstraints, false, basicConstraints);
certgen.addExtension(Extension.keyUsage, false, keyUsage);
certgen.addExtension(Extension.extendedKeyUsage, false, eku);
// Identifiers
SubjectKeyIdentifier subjectKeyIdentifier = new SubjectKeyIdentifier(csr.getSubjectPublicKeyInfo());
SubjectKeyIdentifier subjectKeyIdentifier = SubjectKeyIdentifier.getInstance(csr.getSubjectPublicKeyInfo());
AuthorityKeyIdentifier authorityKeyIdentifier = new AuthorityKeyIdentifier(new GeneralNames
(new GeneralName(issuer)), caCert.getSerialNumber());
certgen.addExtension(X509Extension.subjectKeyIdentifier, false, subjectKeyIdentifier);
certgen.addExtension(X509Extension.authorityKeyIdentifier, false, authorityKeyIdentifier);
certgen.addExtension(Extension.subjectKeyIdentifier, false, subjectKeyIdentifier);
certgen.addExtension(Extension.authorityKeyIdentifier, false, authorityKeyIdentifier);
ContentSigner signer = new BcRSAContentSignerBuilder(sigAlgId, digAlgId).build(PrivateKeyFactory.createKey(caKey.getEncoded()));
X509CertificateHolder holder = certgen.build(signer);
......@@ -102,7 +102,7 @@ public class CA {
PemObject po = new PemObject("CERTIFICATE", certencoded);
FileOutputStream fos = new FileOutputStream(VPN.cfg.getProperty("ca.storeDir", "ca") + "/" + bigserial.toString() + ".crt");
PEMWriter pw = new PEMWriter(new OutputStreamWriter(fos));
JcaPEMWriter pw = new JcaPEMWriter(new OutputStreamWriter(fos));
pw.writeObject(po);
pw.close();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment