Skip to content

Commit

Permalink
Fix #1011: Set powerauth-java-crypto version to 1.5.1-SNAPSHOT (#1012)
Browse files Browse the repository at this point in the history
  • Loading branch information
banterCZ authored Sep 7, 2023
1 parent b180298 commit 2ca408c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<spring-cloud-vault.version>4.0.1</spring-cloud-vault.version>

<!-- Wultra Dependencies -->
<powerauth-java-crypto.version>1.5.0</powerauth-java-crypto.version>
<powerauth-java-crypto.version>1.5.1-SNAPSHOT</powerauth-java-crypto.version>
<wultra-core.version>1.7.0</wultra-core.version>

<bcprov-jdk18on.version>1.76</bcprov-jdk18on.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,7 @@
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
import java.util.Base64;
import java.util.Calendar;
import java.util.Date;
import java.util.Optional;
import java.util.*;

/**
* Behavior that contains methods related to simple token-based authentication.
Expand Down Expand Up @@ -308,15 +305,16 @@ public ValidateTokenResponse validateToken(ValidateTokenRequest request) throws
isTokenValid = false;
} else {
// Check MAC token verification request for replay attacks and persist unique value from request
// TODO Roman - just make to compile, will be fixed later
final String version = "3.2";
replayVerificationService.checkAndPersistUniqueValue(
UniqueValueType.MAC_TOKEN,
new Date(request.getTimestamp()),
null,
request.getNonce(),
token.getTokenId(),
activation.getVersion().toString());
version);
// Validate MAC token
isTokenValid = tokenVerifier.validateTokenDigest(nonce, timestamp, tokenSecret, tokenDigest);
isTokenValid = tokenVerifier.validateTokenDigest(nonce, timestamp, version, tokenSecret, tokenDigest);
}

final ValidateTokenResponse response = new ValidateTokenResponse();
Expand Down

0 comments on commit 2ca408c

Please sign in to comment.