Get public key from certificate.