Skip to content

Commit

Permalink
Fixing merge
Browse files Browse the repository at this point in the history
  • Loading branch information
coheigea committed Nov 23, 2016
1 parent 24bbc95 commit f794e01
Showing 1 changed file with 6 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -928,8 +928,7 @@ private String setupUTDerivedKey(UsernameToken sigToken) throws WSSecurityExcept
return id;
}

<<<<<<< HEAD
private String getEncryptedKey() {
private SecurityToken getEncryptedKey() {

List<WSHandlerResult> results = CastUtils.cast((List<?>)message.getExchange().getInMessage()
.get(WSHandlerConstants.RECV_RESULTS));
Expand All @@ -946,32 +945,14 @@ private String getEncryptedKey() {
Date created = new Date();
Date expires = new Date();
expires.setTime(created.getTime() + 300000);
SecurityToken tempTok = new SecurityToken(encryptedKeyID, created, expires);
tempTok.setSecret((byte[])wser.get(WSSecurityEngineResult.TAG_SECRET));
tempTok.setSHA1(getSHA1((byte[])wser
SecurityToken securityToken = new SecurityToken(encryptedKeyID, created, expires);
securityToken.setSecret((byte[])wser.get(WSSecurityEngineResult.TAG_SECRET));
securityToken.setSHA1(getSHA1((byte[])wser
.get(WSSecurityEngineResult.TAG_ENCRYPTED_EPHEMERAL_KEY)));
tokenStore.add(tempTok);

return encryptedKeyID;
return securityToken;
}
}
=======
private SecurityToken getEncryptedKey() {
WSSecurityEngineResult encryptedKeyResult = getEncryptedKeyResult();
if (encryptedKeyResult != null) {
// Store it in the cache
Date created = new Date();
Date expires = new Date();
expires.setTime(created.getTime() + WSS4JUtils.getSecurityTokenLifetime(message));

String encryptedKeyID = (String)encryptedKeyResult.get(WSSecurityEngineResult.TAG_ID);
SecurityToken securityToken = new SecurityToken(encryptedKeyID, created, expires);
securityToken.setSecret((byte[])encryptedKeyResult.get(WSSecurityEngineResult.TAG_SECRET));
securityToken.setSHA1(getSHA1((byte[])encryptedKeyResult
.get(WSSecurityEngineResult.TAG_ENCRYPTED_EPHEMERAL_KEY)));

return securityToken;
>>>>>>> 0769de2... CXF-7148 - Race Condition while handling symmetric key in SymmetricBindingHandler
}
return null;
}
Expand All @@ -993,15 +974,9 @@ private SecurityToken getUTDerivedKey() throws WSSecurityException {
}
Date created = new Date();
Date expires = new Date();
<<<<<<< HEAD
expires.setTime(created.getTime() + 300000);
SecurityToken tempTok = new SecurityToken(utID, created, expires);

=======
expires.setTime(created.getTime() + WSS4JUtils.getSecurityTokenLifetime(message));
SecurityToken securityToken = new SecurityToken(utID, created, expires);

>>>>>>> 0769de2... CXF-7148 - Race Condition while handling symmetric key in SymmetricBindingHandler

byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET);
securityToken.setSecret(secret);

Expand Down

0 comments on commit f794e01

Please # to comment.