From 5df3a06acce7cc3af8934f5b7642cea46537fdc5 Mon Sep 17 00:00:00 2001 From: Pascal Davoust Date: Tue, 16 Jan 2024 12:36:35 +0100 Subject: [PATCH] Fixed signature algorithm extraction when specified in keyalias (Google Cloud KMS) --- .../src/main/java/net/jsign/jca/GoogleCloudSigningService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jsign-core/src/main/java/net/jsign/jca/GoogleCloudSigningService.java b/jsign-core/src/main/java/net/jsign/jca/GoogleCloudSigningService.java index 963eed61..07081639 100644 --- a/jsign-core/src/main/java/net/jsign/jca/GoogleCloudSigningService.java +++ b/jsign-core/src/main/java/net/jsign/jca/GoogleCloudSigningService.java @@ -120,8 +120,8 @@ public SigningServicePrivateKey getPrivateKey(String alias, char[] password) thr // full key with version specified if (alias.contains(":")) { // syntax with the algorithm appended to the alias - alias = alias.substring(0, alias.indexOf(':')); algorithm = alias.substring(alias.indexOf(':') + 1) + "_SIGN"; + alias = alias.substring(0, alias.indexOf(':')); } else { Certificate[] chain = getCertificateChain(alias); if (chain != null && chain.length > 0) {