You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Federico Einhorn (JIRA)" <ji...@apache.org> on 2018/10/24 11:46:00 UTC

[jira] [Updated] (CAMEL-12897) PGP Decryption in XML DSL not working

     [ https://issues.apache.org/jira/browse/CAMEL-12897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Federico Einhorn updated CAMEL-12897:
-------------------------------------
    Description: 
I'm trying to use camel-crypto to crypt and decrypt files with PGP.

Right now, I have the following in my XML DSL:
{code:java}
<dataFormats>
    <pgp id="encrypt" keyFileName="party2public.pgp" keyUserid="party2"/>
    <pgp id="decrypt" keyFileName="party2private.pgp"/>
</dataFormats>

<route id="encrypter">
    <from uri="file:ToEncrypt"/>
    <marshal ref="encrypt"/>
    <to uri="file:Encrypted"/>
</route>

<route id="decrypter">
    <from uri="file:ToDecrypt"/>
    <unmarshal ref="decrypt"/>
    <to uri="file:Decrypted"/>
</route>
{code}
 

The encryption does work, while the decryption throws an error:
{noformat}
org.bouncycastle.openpgp.PGPException: PGP message is encrypted with a key which could not be found in the Secret Keyring.{noformat}
I created a repo with the files being used (camel context, PGP private and public keys), that can be viewed here: [https://github.com/apoguy/Camel-PGP-Test]

  was:
I'm trying to use camel-crypto to crypt and decrypt files with PGP.

Right now, I have the following in my XML DSL:

 
{code:java}
<dataFormats>
    <pgp id="encrypt" keyFileName="party2public.pgp" keyUserid="party2"/>
    <pgp id="decrypt" keyFileName="party2private.pgp"/>
</dataFormats>

<route id="encrypter">
    <from uri="file:ToEncrypt"/>
    <marshal ref="encrypt"/>
    <to uri="file:Encrypted"/>
</route>

<route id="decrypter">
    <from uri="file:ToDecrypt"/>
    <unmarshal ref="decrypt"/>
    <to uri="file:Decrypted"/>
</route>
{code}
 

 

The encryption does work, while the decryption throws an error:

 
{noformat}
org.bouncycastle.openpgp.PGPException: PGP message is encrypted with a key which could not be found in the Secret Keyring.{noformat}
I created a repo with the files being used (camel context, PGP private and public keys), that can be viewed here: https://github.com/apoguy/Camel-PGP-Test

 


> PGP Decryption in XML DSL not working
> -------------------------------------
>
>                 Key: CAMEL-12897
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12897
>             Project: Camel
>          Issue Type: Bug
>          Components:  camel-crypto
>    Affects Versions: 2.21.1
>         Environment: This was tested on Windows 10, Java 1.8.191. Using camel core and camel crypto both at 2.21.1.
>            Reporter: Federico Einhorn
>            Priority: Major
>
> I'm trying to use camel-crypto to crypt and decrypt files with PGP.
> Right now, I have the following in my XML DSL:
> {code:java}
> <dataFormats>
>     <pgp id="encrypt" keyFileName="party2public.pgp" keyUserid="party2"/>
>     <pgp id="decrypt" keyFileName="party2private.pgp"/>
> </dataFormats>
> <route id="encrypter">
>     <from uri="file:ToEncrypt"/>
>     <marshal ref="encrypt"/>
>     <to uri="file:Encrypted"/>
> </route>
> <route id="decrypter">
>     <from uri="file:ToDecrypt"/>
>     <unmarshal ref="decrypt"/>
>     <to uri="file:Decrypted"/>
> </route>
> {code}
>  
> The encryption does work, while the decryption throws an error:
> {noformat}
> org.bouncycastle.openpgp.PGPException: PGP message is encrypted with a key which could not be found in the Secret Keyring.{noformat}
> I created a repo with the files being used (camel context, PGP private and public keys), that can be viewed here: [https://github.com/apoguy/Camel-PGP-Test]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)