public synchronized PrivateKey getPrivateKeyForLocalCert ( final X509Certificate cert ) throws CertificateEncodingException , KeyStoreException , UnrecoverableKeyException , NoSuchAlgorithmException { String thumbprint = ThumbprintUtil . getThumbprint ( cert ) ; return ( PrivateKey ) _ks . getKey ( thumbprint , _keypassword ) ; }
For a cert we have generated return the private key .