### Generate keystore for LDAP testing Source: https://github.com/shibboleth/java-opensaml/blob/main/opensaml-security-impl/src/test/resources/org/opensaml/security/ldap/impl/README.md Creates a keystore containing a 4096-bit RSA private key entry. ```bash keytool -genkey -keyalg RSA -keystore test-ldap.keystore -storepass changeit -validity 3600 -keysize 4096 -dname CN=localhost,DC=shibboleth,DC=net ``` -------------------------------- ### Extract certificate and public key Source: https://github.com/shibboleth/java-opensaml/blob/main/opensaml-security-impl/src/test/resources/org/opensaml/security/ldap/impl/README.md Commands to export the certificate from the keystore and extract the public key. ```bash keytool -keystore test-ldap.keystore -storepass changeit -exportcert -file temp.crt ``` ```bash openssl x509 -inform der -in temp.crt -noout -pubkey >test-ldap.key ``` ```bash openssl rsa -pubin -noout -text -in test-ldap.key ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.