Esempio n. 1
0
  void identify() {

    try {

      byte[] random = null;
      System.out.println("2. Identify User");

      X509Certificate myCert = Disk.readCert("./Sample/IVS/myCert.der");
      X509Certificate cert = Disk.readCert("./Sample/IVS/cert.der");

      IdentifyUser verifyCert = new IdentifyUser("./Sample/IVS/gpkiapi.conf");

      verifyCert.setMyCert(myCert);
      verifyCert.identify("7777770000001", random, cert);

      System.out.println(" ... ok");

    } catch (Exception e) {

      e.printStackTrace();
      nErrCnt++;
    }
  }
Esempio n. 2
0
  void verify() {

    byte[] bBuf = null;
    try {

      System.out.println("1. Verify Cert");

      X509Certificate myCert = Disk.readCert("./Sample/IVS/myCert.der");
      X509Certificate cert = Disk.readCert("./Sample/IVS/cert.der");

      VerifyCert verifyCert = new VerifyCert("./Sample/IVS/gpkiapi.conf");

      verifyCert.setMyCert(myCert);
      verifyCert.verify(cert);

      System.out.println(" ... ok");

    } catch (Exception e) {

      e.printStackTrace();
      nErrCnt++;
    }
  }