camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan McGuire <>
Subject Can't Unmarshal pgp elgamal encrypted message
Date Sun, 29 Jul 2012 20:33:39 GMT
I've ran into a problem with the Camel-Crypto pgp DataFormat.  It works great with RSA keys,
but with DSA/ElGamal keys it fails with the  It does this
because the signing DSA key is being used as the private key instead of the ElGamal encryption
key.  For a test, you can make a simple route that just marshals and unmarshals using PGP
format and DSA/ElGamal keys.
I opened and have a patch included.

Below is a test case:
@ContextConfiguration(locations = {"classpath:TestGPG-context.xml"})
public class TestGPG {

    protected CamelContext camel;

    @Produce(uri = "direct:test.elgamal")
    protected ProducerTemplate myTemplate;

    @EndpointInject(uri = "mock:end")
    protected MockEndpoint endpoint;

    public void initialize() throws Exception {
        camel.addRoutes(new RouteBuilder() {
            public void configure() throws Exception {

                        .unmarshal().pgp("classpath:secring.gpg", "", "password")

    public void testTheirMocksAreValid() throws Exception {
Confidentiality Statement: The information (including any attachments)
contained in this communication is only meant for the intended recipient of
the transmission, and may be a confidential or a communication privileged
by law. If you are not the addressee or authorized to receive this for the
addressee, you must not use, copy, disclose, or take any action based on
this message or any information herein. If you have received this
communication in error, please re-send this communication to the sender
and delete the original message or any copy of it from your computer
system. Thank You 

View raw message