camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siano, Stephan" <stephan.si...@sap.com>
Subject RE: Issue with digital signature using raw keys
Date Tue, 06 May 2014 07:18:14 GMT
Hi,

I am not sure what you want to do; signature with X.509 keys or with PGP (the key rings in
the data format indicate PGP whereas your route indicates X.509). Can you clear this up?

Best regards
Stephan

-----Original Message-----
From: sreejeb2 [mailto:sreejith.gopinathan@lumoenergy.com.au] 
Sent: Dienstag, 6. Mai 2014 08:23
To: users@camel.apache.org
Subject: Issue with digital signature using raw keys

Hi All,I'm using camel 2.13. I have my private key and public key generated.
The secring and pubring file are also available. 
I'm getting an error when I try to sign the document. 
I'm trying to encrypt a text file and sign it before send to my client. I
added the dataFormats 

<http://camel.465427.n5.nabble.com/file/n5750891/1.jpg> 
The route is defined as 

<http://camel.465427.n5.nabble.com/file/n5750891/2.jpg>          

But on execution im getting

 2014-05-06 15:33:35,740 [ERROR] {Camel (camel-1) thread #0 -
file://D:/Temp/Camel/D/} org.apache.camel.processor.DefaultErrorHandler -
Failed delivery for (MessageId: ID-WS11193-51917-1399354412481-0-5 on
ExchangeId: ID-WS11193-51917-1399354412481-0-6). Exhausted after delivery
attempt: 1 caught: java.lang.IllegalStateException: Cannot sign message as
no Private Key has been supplied. Either supply one in the route definition
sign(keystore, alias) or sign(privateKey) or via the message header
'CamelSignaturePrivateKey'Message
History---------------------------------------------------------------------------------------------------------------------------------------RouteId
            
ProcessorId          Processor                                                           
           
Elapsed (ms)[Samle_Encrypt     ] [Samle_Encrypt     ]
[file://D:/Temp/Camel/D/                                                      
] [         1][Samle_Encrypt     ] [to1               ]
[crypto:sign://basic?privateKey=my_private_key.ppk                 ] [        
0]Exchange---------------------------------------------------------------------------------------------------------------------------------------Exchange[
Id                  ID-WS11193-51917-1399354412481-0-6	ExchangePattern    
InOnly	Headers             {breadcrumbId=ID-WS11193-51917-1399354412481-0-5,
CamelFileAbsolute=true, CamelFileAbsolutePath=D:\Temp\Camel\D\dec.txt,
CamelFileLastModified=1399348842338, CamelFileLength=2014,
CamelFileName=dec.txt, CamelFileNameConsumed=dec.txt,
CamelFileNameOnly=dec.txt, CamelFileParent=D:\Temp\Camel\D,
CamelFilePath=D:\Temp\Camel\D\dec.txt, CamelFileRelativePath=dec.txt,
CamelRedelivered=false, CamelRedeliveryCounter=0}	BodyType           
org.apache.camel.component.file.GenericFile	Body                [Body is
file based:
GenericFile[D:\Temp\Camel\D\dec.txt]]]Stacktrace---------------------------------------------------------------------------------------------------------------------------------------java.lang.IllegalStateException:
Cannot sign message as no Private Key has been supplied. Either supply one
in the route definition sign(keystore, alias) or sign(privateKey) or via the
message header 'CamelSignaturePrivateKey'	at
org.apache.camel.component.crypto.processor.SigningProcessor.getPrivateKeyFromKeystoreOrExchange(SigningProcessor.java:68)
~[camel-crypto-2.13.0.jar:2.13.0]	at
org.apache.camel.component.crypto.processor.SigningProcessor.initSignatureService(SigningProcessor.java:51)
~[camel-crypto-2.13.0.jar:2.13.0]	at
org.apache.camel.component.crypto.processor.SigningProcessor.process(SigningProcessor.java:39)
~[camel-crypto-2.13.0.jar:2.13.0]	at
org.apache.camel.component.crypto.DigitalSignatureProducer.process(DigitalSignatureProducer.java:36)
~[camel-crypto-2.13.0.jar:2.13.0]	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
~[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:113)
~[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
~[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
~[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
[camel-core-2.13.0.jar:2.13.0]	at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
[camel-core-2.13.0.jar:2.13.0]	at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
[na:1.7.0_45]	at
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304)
[na:1.7.0_45]	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
[na:1.7.0_45]	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
[na:1.7.0_45]	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_45]	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_45]	at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]

Could anyone throw some light on how to sign with raw keys. 

Thanks for any help in advance.

Cheers,
Sree



--
View this message in context: http://camel.465427.n5.nabble.com/Issue-with-digital-signature-using-raw-keys-tp5750891.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message