This class holds the CAdES-X signature profiles; it supports the inclusion of a combination of the unsigned attributes id-aa-ets-escTimeStamp, id-aa-ets-certCRLTimestamp, id-aa-ets-certValues, id-aa-ets-revocationValues as defined in ETSI TS 101 733 V1.8.1, clause 6.3.
This class holds the CAdES-X signature profiles; it supports the inclusion of a combination of the unsigned attributes id-aa-ets-escTimeStamp, id-aa-ets-certCRLTimestamp, id-aa-ets-certValues, id-aa-ets-revocationValues as defined in ETSI TS 101 733 V1.8.1, clause 6.3.
Inheritance: CAdESProfileX
Exemplo n.º 1
0
        private CAdESSignatureExtension GetExtensionProfile(SignatureParameters parameters
                                                            )
        {
            //jbonilla
            SignatureFormat signFormat = parameters.SignatureFormat;

            if (signFormat.Equals(SignatureFormat.CAdES_BES) || signFormat.Equals(SignatureFormat
                                                                                  .CAdES_EPES))
            {
                return(null);
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_T))
            {
                CAdESProfileT extensionT = new CAdESProfileT();
                extensionT.SetSignatureTsa(TspSource);
                return(extensionT);
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_C))
            {
                CAdESProfileC extensionC = new CAdESProfileC();
                extensionC.SetSignatureTsa(TspSource);
                extensionC.SetCertificateVerifier(Verifier);
                return(extensionC);
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_X))
            {
                CAdESProfileX extensionX = new CAdESProfileX();
                extensionX.SetSignatureTsa(TspSource);
                extensionX.SetExtendedValidationType(1);
                extensionX.SetCertificateVerifier(Verifier);
                return(extensionX);
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_XL))
            {
                CAdESProfileXL extensionXL = new CAdESProfileXL();
                extensionXL.SetSignatureTsa(TspSource);
                extensionXL.SetExtendedValidationType(1);
                extensionXL.SetCertificateVerifier(Verifier);
                return(extensionXL);
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_A))
            {
                CAdESProfileA extensionA = new CAdESProfileA();
                extensionA.SetSignatureTsa(TspSource);
                extensionA.SetCertificateVerifier(Verifier);
                extensionA.SetExtendedValidationType(1);
                return(extensionA);
            }

            throw new ArgumentException("Unsupported signature format " + parameters.SignatureFormat);
        }
Exemplo n.º 2
0
        private CAdESSignatureExtension GetExtensionProfile(SignatureParameters parameters
            )
        {
            //jbonilla    	
            SignatureFormat signFormat = parameters.SignatureFormat;
            if (signFormat.Equals(SignatureFormat.CAdES_BES) || signFormat.Equals(SignatureFormat
                .CAdES_EPES))
            {
                return null;
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_T))
            {
                CAdESProfileT extensionT = new CAdESProfileT();
                extensionT.SetSignatureTsa(TspSource);
                return extensionT;
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_C))
            {
                CAdESProfileC extensionC = new CAdESProfileC();
                extensionC.SetSignatureTsa(TspSource);
                extensionC.SetCertificateVerifier(Verifier);
                return extensionC;
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_X))
            {
                CAdESProfileX extensionX = new CAdESProfileX();
                extensionX.SetSignatureTsa(TspSource);
                extensionX.SetExtendedValidationType(1);
                extensionX.SetCertificateVerifier(Verifier);
                return extensionX;
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_XL))
            {
                CAdESProfileXL extensionXL = new CAdESProfileXL();
                extensionXL.SetSignatureTsa(TspSource);
                extensionXL.SetExtendedValidationType(1);
                extensionXL.SetCertificateVerifier(Verifier);
                return extensionXL;
            }
            else if (signFormat.Equals(SignatureFormat.CAdES_A))
            {
                CAdESProfileA extensionA = new CAdESProfileA();
                extensionA.SetSignatureTsa(TspSource);
                extensionA.SetCertificateVerifier(Verifier);
                extensionA.SetExtendedValidationType(1);
                return extensionA;
            }

            throw new ArgumentException("Unsupported signature format " + parameters.SignatureFormat);
        }