Exemplo n.º 1
0
        public CertificateData ReadCertificateData()
        {
            EID_CERTIFICATE nativeCertificateData = new EID_CERTIFICATE();
            //TODO: Get all available certificates at read
            var nativeResult = NativeMethods.EidReadCertificate(ref nativeCertificateData, 1);
            CheckNativeResult(nativeResult);
            CertificateData result = new CertificateData(nativeCertificateData);

            return result;
        }
Exemplo n.º 2
0
        public CertificateData ReadCertificateData(CardType cardType)
        {
            ///CelikAPI cannot read certificates from new cards (Gemalto) Result is always EID_E_UNABLE_TO_EXECUTE
            if (cardType == CardType.NewCardGemalto) return null;

            EID_CERTIFICATE nativeCertificateData = new EID_CERTIFICATE();
            //TODO: Get all available certificates at read
            var nativeResult = NativeMethods.EidReadCertificate(ref nativeCertificateData, 1);
            CheckNativeResult(nativeResult);
            CertificateData result = new CertificateData(nativeCertificateData);

            return result;
        }
Exemplo n.º 3
0
 public static extern int EidReadCertificate(ref EID_CERTIFICATE pData, int certificateType);
Exemplo n.º 4
0
 public CertificateData(EID_CERTIFICATE nativeData)
 {
     Certificate = nativeData.certificate;
 }