Esempio n. 1
0
        public static bool readCertificate(CardChannel channel)
        {
            FCITemplate fcit = selectFile(channel, "B001");

            certificate_HEX_DER_encoded = readBinary(channel, fcit.getFileSize());

            return(true);
        }
Esempio n. 2
0
        public static String[] datosCedula(CardChannel channel)
        {
            String[] resultado = new String[6];
            readCertificate(channel);

            //CertificateFactory cf = CertificateFactory.getInstance("X.509");

            //MemoryStream b64eIDCertificate = new MemoryStream(Utils.hexStringToByteArray(certificate_HEX_DER_encoded));
            //System.Security.Cryptography.X509Certificates.X509Certificate eIDCertificate = (X509Certificate)cf.generateCertificate(b64eIDCertificate);

            //String certSerialNumber = Utils.formatHexaString(eIDCertificate.getSerialNumber().toString(16));

            //resultado[0] = certSerialNumber;
            //resultado[1] = eIDCertificate.getIssuerDN() + "";
            //resultado[2] = eIDCertificate.getNotBefore() + "";
            //resultado[3] = eIDCertificate.getNotAfter() + "";
            //resultado[4] = eIDCertificate.getSubjectDN() + "";

            FCITemplate fcit7004 = selectFile(channel, "7004");

            resultado[5] = readBinary(channel, fcit7004.getFileSize());

            return(resultado);
        }