sdk plugins: enable NBMs to be signed with jME signature
This commit is contained in:
parent
afe5b91605
commit
bcbbf001ce
@ -8,6 +8,8 @@
|
|||||||
<module-dependencies>
|
<module-dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<code-name-base>org.netbeans.modules.autoupdate.services</code-name-base>
|
<code-name-base>org.netbeans.modules.autoupdate.services</code-name-base>
|
||||||
|
<build-prerequisite/>
|
||||||
|
<compile-dependency/>
|
||||||
<run-dependency>
|
<run-dependency>
|
||||||
<specification-version>1.47.2</specification-version>
|
<specification-version>1.47.2</specification-version>
|
||||||
</run-dependency>
|
</run-dependency>
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
com.jme3.gde.core.updatecenters.keystore.JmeKeyStoreProvider
|
@ -0,0 +1,47 @@
|
|||||||
|
package com.jme3.gde.core.updatecenters.keystore;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
|
import java.security.KeyStore;
|
||||||
|
import java.security.KeyStoreException;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
import java.security.cert.CertificateException;
|
||||||
|
import org.netbeans.spi.autoupdate.KeyStoreProvider;
|
||||||
|
import org.openide.util.Exceptions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Loads the jMonkeyEngine SDK Plugins certificates into the AutoUpdate system.
|
||||||
|
*
|
||||||
|
* @author Kirill Vainer
|
||||||
|
*/
|
||||||
|
public class JmeKeyStoreProvider implements KeyStoreProvider {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public KeyStore getKeyStore() {
|
||||||
|
InputStream in = null;
|
||||||
|
try {
|
||||||
|
in = JmeKeyStoreProvider.class.getResourceAsStream("trustedcerts.jks");
|
||||||
|
KeyStore store = KeyStore.getInstance("JKS");
|
||||||
|
store.load(in, "trustedcerts".toCharArray());
|
||||||
|
return store;
|
||||||
|
} catch (KeyStoreException ex) {
|
||||||
|
Exceptions.printStackTrace(ex);
|
||||||
|
} catch (IOException ex) {
|
||||||
|
Exceptions.printStackTrace(ex);
|
||||||
|
} catch (NoSuchAlgorithmException ex) {
|
||||||
|
Exceptions.printStackTrace(ex);
|
||||||
|
} catch (CertificateException ex) {
|
||||||
|
Exceptions.printStackTrace(ex);
|
||||||
|
} finally {
|
||||||
|
if (in != null) {
|
||||||
|
try {
|
||||||
|
in.close();
|
||||||
|
} catch (IOException ex) {
|
||||||
|
Exceptions.printStackTrace(ex);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user