1 / 3

진행사항

진행사항. 공인인증서 파일을 접근합니다 . ( 공인인증서 파일은 X509Certificate2 클래스로 생성 ) X509Certificate2 cert = DecryptCertificate ( "~/NPKI/ kys /signCert.der", "yun841105" ); internal static X509Certificate2 DecryptCertificate (string certificatePath , string keyPassword ) {

dianne
Download Presentation

진행사항

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 진행사항 • 공인인증서 파일을 접근합니다. (공인인증서 파일은 X509Certificate2 클래스로 생성) • X509Certificate2 cert = DecryptCertificate("~/NPKI/kys/signCert.der", "yun841105"); • internal static X509Certificate2 DecryptCertificate(string certificatePath, string keyPassword) • { • String p12File = string.Empty; • try • { • return new X509Certificate2(p12File, keyPassword); • } • catch (Exception ex) • { • throw new Exception("There is a problem with the certificate file: " + p12File, ex); • } • } • 전자서명 XML 생성 • SignedXmlsignedXml = new SignedXml(doc);

  2. 진행사항 • 3. 전자서명 키 값 생성 • RSACryptoServiceProvider Key = new RSACryptoServiceProvider(); • signedXml.SigningKey = Key; • 4. 전자서명 대상 추출 (변환) • Reference reference = new Reference(); • 4.1 전자서명 변환 • reference.AddTransform(new XmlDsigC14NTransform()); • 4.2 전자서명의 대상 • XmlDsigXPathTransformXPathTransform = CreateXPathTransform("not(self::*[name()='TaxInvoice']|ancestor-or- self::*[name()='ExchangedDocument']|ancestor-or-self::Signature)"); • reference.AddTransform(XPathTransform); • 4.3 전자서명 해시 • reference.Uri = ""; • reference.DigestMethod = "http://www.w3.org/2000/09/xmldsig#sha1"; • 4.4 전자서명 변환 추가 • XmlDsigEnvelopedSignatureTransformenv = new XmlDsigEnvelopedSignatureTransform(); • reference.AddTransform(env); • 4.5 전자서명 XML 적용 • signedXml.AddReference(reference); • 5. 전자서명 키 정보 생성 • KeyInfokeyInfo = new KeyInfo(); • KeyInfoX509Data kdata = new KeyInfoX509Data(cert); • keyInfo.AddClause(kdata); • signedXml.KeyInfo = keyInfo; • 6. 전자서명 수행 • signedXml.ComputeSignature(); • XmlElementxmlDigitalSignature = signedXml.GetXml();

  3. 진행사항 • 7. 전자서명 결과 이슈사항 세금계산서 XML 뿐만 아니라 데이터 교환시 중요 정보(ID, KEY 등)을 회사 공인인증서(우리회사)로 암호화 수행 여부 법인 공인인증서를 통해 EzBiz시스템에서 사용자에게 공인인증서 발급과 사용 SilverLight시스템 상 에서의 공인인증서 접근 및 사용, 인증 등에서의 활용여부

More Related