Index: applications/editors/josm/plugins/trustosm/.classpath
===================================================================
--- applications/editors/josm/plugins/trustosm/.classpath	(revision 30828)
+++ applications/editors/josm/plugins/trustosm/.classpath	(revision 30829)
@@ -2,16 +2,16 @@
 <classpath>
 	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="lib" path="lib/bcpg-jdk15on-1.50.jar" sourcepath="bcpg-jdk15on-1.50-sources.jar">
+	<classpathentry kind="lib" path="lib/jcalendar-1.4.jar"/>
+	<classpathentry kind="lib" path="lib/swingx-core-1.6.5-1.jar"/>
+	<classpathentry kind="lib" path="lib/bcpg-jdk15on-151.jar" sourcepath="lib/bcpg-jdk15on-1.51-sources.jar">
 		<attributes>
-			<attribute name="javadoc_location" value="jar:platform:/resource/JOSM-trustosm/bcpg-jdk15on-1.50-javadoc.jar!/"/>
+			<attribute name="javadoc_location" value="jar:platform:/resource/JOSM-trustosm/lib/bcpg-jdk15on-1.51-javadoc.jar!/"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="lib" path="lib/bcprov-jdk15on-1.50.jar" sourcepath="bcprov-jdk15on-1.50-sources.jar">
+	<classpathentry kind="lib" path="lib/bcprov-jdk15on-151.jar" sourcepath="lib/bcprov-jdk15on-1.51-sources.jar">
 		<attributes>
-			<attribute name="javadoc_location" value="jar:platform:/resource/JOSM-trustosm/bcprov-jdk15on-1.50-javadoc.jar!/"/>
+			<attribute name="javadoc_location" value="jar:platform:/resource/JOSM-trustosm/lib/bcprov-jdk15on-1.51-javadoc.jar!/"/>
 		</attributes>
 	</classpathentry>
-	<classpathentry kind="lib" path="lib/jcalendar-1.4.jar"/>
-	<classpathentry kind="lib" path="lib/swingx-core-1.6.5-1.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
Index: applications/editors/josm/plugins/trustosm/build.xml
===================================================================
--- applications/editors/josm/plugins/trustosm/build.xml	(revision 30828)
+++ applications/editors/josm/plugins/trustosm/build.xml	(revision 30829)
@@ -6,8 +6,4 @@
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
     <property name="plugin.main.version" value="7001" />
-
-    <!-- Configure these properties (replace "..." accordingly).
-         See http://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins
-    -->
     <property name="plugin.author" value="Christoph Wagner" />
     <property name="plugin.class" value="org.openstreetmap.josm.plugins.trustosm.TrustOSMplugin" />
@@ -40,4 +36,6 @@
             <fileset dir="${plugin.lib.dir}">
                 <include name="**/*.jar"/>
+                <exclude name="**/*-sources.jar"/>
+                <exclude name="**/*-javadoc.jar"/>
             </fileset>
         </path>
Index: applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java
===================================================================
--- applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java	(revision 30828)
+++ applications/editors/josm/plugins/trustosm/src/org/openstreetmap/josm/plugins/trustosm/util/TrustGPG.java	(revision 30829)
@@ -19,4 +19,5 @@
 import java.security.NoSuchAlgorithmException;
 import java.security.NoSuchProviderException;
+import java.security.Provider;
 import java.security.SecureRandom;
 import java.security.Security;
@@ -47,4 +48,5 @@
 import javax.swing.SpringLayout;
 
+import org.bouncycastle.bcpg.HashAlgorithmTags;
 import org.bouncycastle.bcpg.sig.NotationData;
 import org.bouncycastle.jce.provider.BouncyCastleProvider;
@@ -65,4 +67,16 @@
 import org.bouncycastle.openpgp.PGPSignatureSubpacketVector;
 import org.bouncycastle.openpgp.PGPUtil;
+import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
+import org.bouncycastle.openpgp.operator.PBESecretKeyEncryptor;
+import org.bouncycastle.openpgp.operator.PGPContentSignerBuilder;
+import org.bouncycastle.openpgp.operator.PGPContentVerifierBuilderProvider;
+import org.bouncycastle.openpgp.operator.PGPDigestCalculator;
+import org.bouncycastle.openpgp.operator.PGPDigestCalculatorProvider;
+import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentSignerBuilder;
+import org.bouncycastle.openpgp.operator.jcajce.JcaPGPContentVerifierBuilderProvider;
+import org.bouncycastle.openpgp.operator.jcajce.JcaPGPDigestCalculatorProviderBuilder;
+import org.bouncycastle.openpgp.operator.jcajce.JcaPGPKeyPair;
+import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder;
+import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyEncryptorBuilder;
 import org.bouncycastle.util.encoders.Hex;
 import org.openstreetmap.josm.Main;
@@ -534,7 +548,12 @@
             }
 
-            PGPPrivateKey pgpPrivKey = pgpSecKey.extractPrivateKey(password, "BC");
-            PGPSignatureGenerator sGen = new PGPSignatureGenerator(pgpSecKey.getPublicKey().getAlgorithm(), digest, "BC");
-            sGen.initSign(PGPSignature.CANONICAL_TEXT_DOCUMENT, pgpPrivKey);
+            Provider provider = Security.getProvider("BC");
+            PGPDigestCalculatorProvider digestCalculatorProvider = new JcaPGPDigestCalculatorProviderBuilder().setProvider(provider).build();
+            PBESecretKeyDecryptor secretKeyDecryptor = new JcePBESecretKeyDecryptorBuilder(digestCalculatorProvider).setProvider(provider).build(password);
+            PGPPrivateKey pgpPrivKey = pgpSecKey.extractPrivateKey(secretKeyDecryptor);
+            int keyAlgorithm = pgpSecKey.getPublicKey().getAlgorithm();
+            PGPContentSignerBuilder contentSignerBuilder = new JcaPGPContentSignerBuilder(keyAlgorithm, digest).setProvider(provider).setDigestProvider(provider);
+            PGPSignatureGenerator sGen = new PGPSignatureGenerator(contentSignerBuilder);
+            sGen.init(PGPSignature.CANONICAL_TEXT_DOCUMENT, pgpPrivKey);
 
             Iterator<?> it = pgpSecKey.getPublicKey().getUserIDs();
@@ -575,5 +594,7 @@
     }*/
         try {
-            sig.initVerify(pgpPub.getPublicKey(sig.getKeyID()), "BC");
+            Provider provider = Security.getProvider("BC");
+            PGPContentVerifierBuilderProvider contentVerifierBuilderProvider = new JcaPGPContentVerifierBuilderProvider().setProvider(provider);
+            sig.init(contentVerifierBuilderProvider, pgpPub.getPublicKey(sig.getKeyID()));
             sig.update(sigtext.getBytes(Charset.forName("UTF-8")));
             return sig.verify();
@@ -812,5 +833,5 @@
 
         Date now = new Date();
-        PGPKeyPair pgpKp = new PGPKeyPair(al, kp, now);
+        PGPKeyPair pgpKp = new JcaPGPKeyPair(al, kp, now);
 
         getPasswordfromUser();
@@ -825,6 +846,13 @@
         }
 
-        PGPKeyRingGenerator keyRingGen = new PGPKeyRingGenerator(PGPSignature.POSITIVE_CERTIFICATION, pgpKp,
-                userId.getText(), protAl[protectBox.getSelectedIndex()], password, true, subPck, null, new SecureRandom(), "BC");
+        Provider provider = Security.getProvider("BC");
+        int encAlgorithm = protAl[protectBox.getSelectedIndex()];
+        PGPDigestCalculator checksumCalculator = new JcaPGPDigestCalculatorProviderBuilder().build().get(HashAlgorithmTags.SHA1);
+        PGPContentSignerBuilder signerBuilder = new JcaPGPContentSignerBuilder(pgpKp.getPublicKey().getAlgorithm(), HashAlgorithmTags.SHA1);
+        PBESecretKeyEncryptor encryptor = new JcePBESecretKeyEncryptorBuilder(encAlgorithm).setProvider(provider).
+                setSecureRandom(new SecureRandom()).build(password);
+        
+        PGPKeyRingGenerator keyRingGen = new PGPKeyRingGenerator(PGPSignature.POSITIVE_CERTIFICATION, pgpKp, userId.getText(),
+                checksumCalculator, subPck, null, signerBuilder, encryptor);
 
         if (pgpPub == null) {
