web stats
PGP/GPG Decryption Problems using Bouncy Castle - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Thread Tools Display Modes
Old 02-16-2017, 05:44 AM
craig.burdulis craig.burdulis is offline
Mirth Newb
Join Date: Jan 2016
Posts: 7
craig.burdulis is on a distinguished road
Default PGP/GPG Decryption Problems using Bouncy Castle

I am trying to decrypt pgp-encrypted files using the Bouncy Castle library. I have the JDK 1.8 Provider/OpenPGP jars in custom-lib and a channel with them as a resource dependency. I adapted some code I found online to read the secret/public keys and decrypt a file, but am running into the following error when I run the channel:
Transformer error
ERROR MESSAGE: Error evaluating transformer
java.lang.NoSuchMethodError: org.bouncycastle.util.Strings.newList()Lorg/bouncycastle/util/StringList;
	at org.bouncycastle.bcpg.ArmoredInputStream.<init>(Unknown Source)
	at org.bouncycastle.bcpg.ArmoredInputStream.<init>(Unknown Source)
	at org.bouncycastle.openpgp.PGPUtil.getDecoderStream(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1479)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:815)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3280)
	at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:120)
	at com.mirth.connect.server.util.javascript.JavaScriptTask.executeScript(JavaScriptTask.java:142)
	at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall(JavaScriptFilterTransformer.java:143)
	at com.mirth.connect.server.transformers.JavaScriptFilterTransformer$FilterTransformerTask.doCall(JavaScriptFilterTransformer.java:119)
	at com.mirth.connect.server.util.javascript.JavaScriptTask.call(JavaScriptTask.java:113)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
I have tried using different versions of the jars (JDK 1.4) but I get the same error. It seems like it is related in particular to line 20 in the "Functions" source transformer:
inStream = Packages.org.bouncycastle.openpgp.PGPUtil.getDecoderStream(inStream);
There is not much I've found online regarding this error. Has anyone been able to get the Bouncy Castle library working in MC? I have included my channel in attachments.


Mirth Connect Server Information:
Server 3.4.2
Java HotSpot(TM) 64-Bit Server VM 1.8.0_91
CentOS (Mirth Appliance)
Attached Files
File Type: xml Panel Decryption.xml (18.1 KB, 19 views)
Reply With Quote
Old 02-04-2019, 09:44 AM
kirbyjwilson kirbyjwilson is offline
OBX.2 Kenobi
Join Date: May 2012
Posts: 61
kirbyjwilson is on a distinguished road

Did you ever get your channel to work, or did you abandon all attempts to use Bouncy Castle?
Reply With Quote

bouncy, castle, decryption, gpg, pgp

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT -8. The time now is 03:20 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation