aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2015-12-04 21:19:53 +0100
committerThomas Lenz <thomas.lenz@egiz.gv.at>2015-12-04 21:19:53 +0100
commit34c964709547ef67085d29e4d4b9692551be5140 (patch)
treef0c99e868b9fe25233d3ab9b8fe6463594f9ac61 /id/server/idserverlib/src/main
parent9712ee699bdf5da38bb5478c72aa1a5222f08991 (diff)
downloadmoa-id-spss-34c964709547ef67085d29e4d4b9692551be5140.tar.gz
moa-id-spss-34c964709547ef67085d29e4d4b9692551be5140.tar.bz2
moa-id-spss-34c964709547ef67085d29e4d4b9692551be5140.zip
check if PVP SigningCredentials contains a privatekey after load keystore load operation
Diffstat (limited to 'id/server/idserverlib/src/main')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java
index fe287a433..645eb9e53 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialProvider.java
@@ -59,6 +59,12 @@ public class CredentialProvider {
.getIDPKeyPasswordMetadata().toCharArray());
credentials.setUsageType(UsageType.SIGNING);
+ if (credentials.getPrivateKey() == null && credentials.getSecretKey() == null) {
+ Logger.error("IDP Metadata Signing credentials is not found or contains no PrivateKey.");
+ throw new CredentialsNotAvailableException("IDP Assertion Signing credentials (Alias: "
+ + config.getIDPKeyAliasMetadata() + ") is not found or contains no PrivateKey.", null);
+
+ }
return credentials;
} catch (Exception e) {
Logger.error("Failed to generate IDP Metadata Signing credentials");