-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdk plugins: enable NBMs to be signed with jME signature
- Loading branch information
1 parent
afe5b91
commit bcbbf00
Showing
4 changed files
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...me3-core-updatecenters/src/META-INF/services/org.netbeans.spi.autoupdate.KeyStoreProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
com.jme3.gde.core.updatecenters.keystore.JmeKeyStoreProvider |
47 changes: 47 additions & 0 deletions
47
...-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/JmeKeyStoreProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 added
BIN
+802 Bytes
sdk/jme3-core-updatecenters/src/com/jme3/gde/core/updatecenters/keystore/trustedcerts.jks
Binary file not shown.