com.r3corda.core.crypto / X509Utilities / loadCertificateAndKey

# loadCertificateAndKey

`fun loadCertificateAndKey(keyStore: KeyStore, keyPassword: String, alias: String): CACertAndKey`

Helper method to load a Certificate and KeyPair from their KeyStore. The access details should match those of the createCAKeyStoreAndTrustStore call used to manufacture the keys.

### Parameters

`keyStore` - Source KeyStore to look in for the data
`keyPassword` - The password for the PrivateKey (not the store access password)
`alias` - The name to search for the data. Typically if generated with the methods here this will be one of CERT_PRIVATE_KEY_ALIAS, ROOT_CA_CERT_PRIVATE_KEY_ALIAS, INTERMEDIATE_CA_PRIVATE_KEY_ALIAS defined above