ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Namrata Jaiswal (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (WSS-581) Decryption fails with cipher not initialized error when multiple attachmments are used
Date Tue, 21 Jun 2016 16:21:58 GMT

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

Namrata Jaiswal updated WSS-581:
--------------------------------
    Attachment: logs.txt
                graycol.gif


Logs attached

(See attached file: logs.txt)

Thanks,
Namrata



From:	"Colm O hEigeartaigh (JIRA)" <jira@apache.org>
To:	Namrata Jaiswal/India/IBM@IBMIN
Date:	06/21/2016 02:54 PM
Subject:	[jira] [Commented] (WSS-581) Decryption fails with cipher not
            initialized error when multiple attachmments are used




    [
https://issues.apache.org/jira/browse/WSS-581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15341431#comment-15341431
 ]

Colm O hEigeartaigh commented on WSS-581:
-----------------------------------------

What's the full stacktrace?

attachmments are used
--------------------------------------------------------------------------------------

WSS4j, decryption does not work
javax.security.auth.callback.CallbackHandler#handle
(javax.security.auth.callback.Callback[]) API  for both
AttachmentRequestCallback and AttachmentResultCallback are invoked for
first attachment and also AttachmentResultCallback returned decrypted the
data )but it breaks with error Cipher not initialized for second
attachment. For 2nd attachment, AttachmentRequestCallback goes fine where
we set everything but handle call for AttachmentResultCallback breaks with
error  Cipher not initialized (before invoking password callbacks) when we
try to read decrypted data.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)




> Decryption fails with cipher not initialized error when multiple attachmments are used
> --------------------------------------------------------------------------------------
>
>                 Key: WSS-581
>                 URL: https://issues.apache.org/jira/browse/WSS-581
>             Project: WSS4J
>          Issue Type: Bug
>          Components: WSS4J Core
>    Affects Versions: 2.0.7
>            Reporter: Namrata Jaiswal
>            Assignee: Colm O hEigeartaigh
>         Attachments: graycol.gif, logs.txt
>
>
> When multiple attachments are used for decrypting using Stax Apis in WSS4j, decryption
does not work
> The decryption works fine for 1st attachment (I can see that javax.security.auth.callback.CallbackHandler#handle(javax.security.auth.callback.Callback[])
API  for both AttachmentRequestCallback and AttachmentResultCallback are invoked for first
attachment and also AttachmentResultCallback returned decrypted the data )but it breaks with
error Cipher not initialized for second attachment. For 2nd attachment, AttachmentRequestCallback
goes fine where we set everything but handle call for AttachmentResultCallback breaks with
error  Cipher not initialized (before invoking password callbacks) when we try to read decrypted
data.
> Caused by: java.lang.IllegalStateException: Cipher not initialized
> 	at javax.crypto.Cipher.d(Unknown Source)
> 	at javax.crypto.Cipher.doFinal(Unknown Source)
> 	at javax.crypto.CipherInputStream.close(Unknown Source)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message