If the entry for the indicated alias in the keystore is of certificate type, the certificate can be obtained through this function.

1 java.security.KeyStore.getCertificate

<java.security.KeyStore.getCertificate name='name'>
    <keystore /> ?
</java.security.KeyStore.getCertificate>