X509CertParser parser = new X509CertParser();
parser.engineInit( new ByteArrayInputStream( adminEntry.get( TlsKeyGenerator.USER_CERTIFICATE_AT ).getBytes() ) );
X509Certificate cert = ( X509Certificate ) parser.engineRead();
ks.setCertificateEntry( "cert", cert );
KeyPair keyPair = TlsKeyGenerator.getKeyPair( adminEntry );
ks.setKeyEntry( "privatekey", keyPair.getPrivate(), password.toCharArray(), new Certificate[]{ cert } );