code: public int getVersion() {
          if (info == null)
              return -1;
          try {
              int vers = ((Integer)info.get(CertificateVersion.NAME
                          + DOT + CertificateVersion.VERSION)).intValue();
              return vers+1;
          } catch (Exception e) {
              return -1;
          }
      }
docs: Gets the version number from the certificate.
  
  @return the version number, i.e. 1, 2 or 3.