saml key refactor

This commit is contained in:
Bill Burke
2014-10-24 10:58:32 -04:00
parent ad7e2cd12e
commit ce76270ad8
26 changed files with 1688 additions and 130 deletions

View File

@@ -132,6 +132,7 @@ public final class KeycloakModelUtils {
}
public static void generateClientKeyPairCertificate(ClientModel client) {
String subject = client.getClientId();
KeyPair keyPair = null;
try {
keyPair = KeyPairGenerator.getInstance("RSA").generateKeyPair();
@@ -140,7 +141,7 @@ public final class KeycloakModelUtils {
}
X509Certificate certificate = null;
try {
certificate = CertificateUtils.generateV1SelfSignedCertificate(keyPair, client.getClientId());
certificate = CertificateUtils.generateV1SelfSignedCertificate(keyPair, subject);
} catch (Exception e) {
throw new RuntimeException(e);
}