Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1011: Set powerauth-java-crypto version to 1.5.1-SNAPSHOT #1012

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading