protected void getClientPublicKey(byte[] clpubkey) throws Exception {
    DERObject obj = BouncyCastleUtil.toDERObject(clpubkey);
    byte[] pubkey = BouncyCastleUtil.toByteArray(obj);
    ByteArrayInputStream in = new ByteArrayInputStream(pubkey);
    X509Certificate cert = CertUtil.loadCertificate(in);

    SCUtil.pathValidation(cert, trustedCerts);
    logger.finest("path validated !!!");

    clPubkey = cert.getPublicKey();
  }