aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/com/juick/SignatureManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/juick/SignatureManager.java b/src/main/java/com/juick/SignatureManager.java
index 0d7b17a6..3575100d 100644
--- a/src/main/java/com/juick/SignatureManager.java
+++ b/src/main/java/com/juick/SignatureManager.java
@@ -90,8 +90,8 @@ public class SignatureManager {
}
public String addSignature(Person from, String host, String method, String path, String dateString, KeystoreManager keystoreManager) throws IOException {
- Signature templateSignature = new Signature(from.getPublicKey().getId(), SigningAlgorithm.HS2019.getAlgorithmName(), Algorithm.RSA_SHA256.getJvmName(), null,
- Arrays.asList("(request-target)", "host", "date"));
+ Signature templateSignature = new Signature(from.getPublicKey().getId(), "rsa-sha256", null,
+ "(request-target)", "host", "date");
Map<String, String> headers = new HashMap<>();
headers.put("host", host);
headers.put("date", dateString);
@@ -104,7 +104,7 @@ public class SignatureManager {
public User verifySignature(String method, String path, Map<String, String> headers) {
String signatureString = headers.get("signature");
logger.info("Signature: {}", signatureString);
- Signature signature = Signature.fromString(signatureString, Algorithm.get("rsa-sha256"));
+ Signature signature = Signature.fromString(signatureString);
Optional<Context> context = getContext(UriComponentsBuilder.fromUriString(signature.getKeyId())
.fragment(null).build().toUri());
if (context.isPresent() && context.get() instanceof Person) {