public SetExtendedValidationType ( int extendedValidationType ) : void | ||
extendedValidationType | int | to type to set, 1 or 2 |
리턴 | void |
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); }
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); }