Skip to content
Permalink
Browse files
Fixing some EncryptBeforeSigning tests
git-svn-id: https://svn.apache.org/repos/asf/cxf/trunk@1564723 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
coheigea committed Feb 5, 2014
1 parent 683dc5c commit 0c77f4ff91451c0bf73ebe1103e99583cc26d786
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
@@ -253,8 +253,11 @@ private AbstractTokenWrapper getEncryptBeforeSignWrapper() {

private void doEncryptBeforeSign() {
AbstractTokenWrapper wrapper = getEncryptBeforeSignWrapper();
AbstractToken encryptionToken = wrapper.getToken();
assertToken(encryptionToken);
AbstractToken encryptionToken = null;
if (wrapper != null) {
encryptionToken = wrapper.getToken();
assertToken(encryptionToken);
}

AbstractTokenWrapper initiatorWrapper = abinding.getInitiatorSignatureToken();
if (initiatorWrapper == null) {
@@ -244,8 +244,10 @@ private void doEncryptBeforeSign() {
}
}
assertTokenWrapper(wrapper);
encryptionToken = wrapper.getToken();
assertToken(encryptionToken);
if (wrapper != null) {
encryptionToken = wrapper.getToken();
assertToken(encryptionToken);
}

AbstractTokenWrapper initiatorWrapper = abinding.getInitiatorSignatureToken();
if (initiatorWrapper == null) {
@@ -143,11 +143,7 @@ private void doEncryptBeforeSign() {
List<WSEncryptionPart> encrParts = getEncryptedParts();
List<WSEncryptionPart> sigParts = getSignedParts();

//if (encryptionToken == null && encrParts.size() > 0) {
//REVISIT - nothing to encrypt?
//}

if (encryptionToken != null && encrParts.size() > 0) {
if (encryptionToken != null) {
//The encryption token can be an IssuedToken or a
//SecureConversationToken
String tokenId = null;

0 comments on commit 0c77f4f

Please sign in to comment.