| | |
| | | @Test |
| | | public void testGetInstanceKeyCertificate() |
| | | throws Exception { |
| | | final CryptoManager cm = DirectoryServer.getCryptoManager(); |
| | | final CryptoManagerImpl cm = DirectoryServer.getCryptoManager(); |
| | | final byte[] cert |
| | | = CryptoManager.getInstanceKeyCertificateFromLocalTruststore(); |
| | | = CryptoManagerImpl.getInstanceKeyCertificateFromLocalTruststore(); |
| | | assertNotNull(cert); |
| | | |
| | | // The certificate should now be accessible in the truststore backend via LDAP. |
| | |
| | | md.digest(ldapCert)).equals(cm.getInstanceKeyID())); |
| | | |
| | | // Call twice to ensure idempotent. |
| | | CryptoManager.publishInstanceKeyEntryInADS(); |
| | | CryptoManager.publishInstanceKeyEntryInADS(); |
| | | CryptoManagerImpl.publishInstanceKeyEntryInADS(); |
| | | CryptoManagerImpl.publishInstanceKeyEntryInADS(); |
| | | } |
| | | |
| | | @Test |
| | |
| | | @Test(dataProvider="cipherParametersData") |
| | | public void testStreamEncryptDecryptSuccess(CipherParameters cp) |
| | | throws Exception { |
| | | final CryptoManager cm = DirectoryServer.getCryptoManager(); |
| | | final CryptoManagerImpl cm = DirectoryServer.getCryptoManager(); |
| | | final String secretMessage = "56789"; |
| | | |
| | | final File tempFile |