Microsoft MVP성태의 닷넷 이야기
서버인증서및클라이언트인증서 발급 [링크 복사], [링크+제목 복사],
조회: 14142
글쓴 사람
guest (djyang327 at hanmail.net)
홈페이지
첨부 파일
 

안녕하세요...

현재 웹서비스를 구현 작업을 하고 있습니다.

최종 목적은 클라이언트의 인증서에서 CN값을 뽑아와야 합니다.

현재 os는 windows xp pro입니다.

궁금한 사항 : windows xp pro And windows 2000에서 웹서버에서 서버인증서를 사용할 수 있나요?

서버인증서 발급 : 현재 서버 인증서를 makecert으로 해서 만들었습니다.
클라이언트 인증서 : 현재 클라이언트 인증서를 makecert으로 만들었습니다.

마소 참조해서...
makecert -n “CN=WSE_Server” -sky exchange -pe -ss My -sr localmachine WSE_Server.cer
makecert -n “CN=WSE_Client” -sky exchange -pe -ss My WSE_Client.cer

windows xp pro and windows 2000 pro에서 이렇게 해서 사용해도 될까요?
왜냐하면, msdn을 보며는
http://support.microsoft.com/default.aspx?scid=kb%3Bko%3B218445 인증서버에서 인증서를 받아야한다고 하는데..
현재 windows xp pro에서 http://localhost/certsrv/페이지가 나오지 않고요...

그리고, makecert으로 만든 인증서를 사용해서,,,,

클라이언트에서 , 서버로 인증서를 보냈을 때, 서버쪽에서 클라이언트의 정보를 갖고 있지 않네요..

클라이언트 측 코드
   localhost.CCWebservice objws ;
                       objws = new localhost.CCWebservice();

                        X509Certificate objCert ;
                        objCert = X509Certificate.CreateFromCertFile("C:\\WSE_Client.cer");

                        objws.ClientCertificates.Add(objCert) ;

                        localhost.ClientCertificateDetails objCertDetails;
                        objCertDetails = objws.GetCertificateDetails();// -> 웹서비스 호출.
디버그에서 objCert에 클라이언트 인증서에 대한 정보가 있음.


서버측
    [SoapDocumentMethod(Binding="CCWebservice")]
        [WebMethod]
        public ClientCertificateDetails GetCertificateDetails()
        {
            HttpClientCertificate objCertificate = HttpContext.Current.Request.ClientCertificate ;
            ClientCertificateDetails objCertificateDetails = new ClientCertificateDetails() ;
            objCertificateDetails.Cookie = objCertificate.Cookie ;
            objCertificateDetails.IsPresent = objCertificate.IsPresent ;
            objCertificateDetails.Issuer = objCertificate.Issuer ;
            objCertificateDetails.IsValid = objCertificate.IsValid ;
            objCertificateDetails.KeySize = objCertificate.KeySize ;
            objCertificateDetails.SecretKeySize = objCertificate.SecretKeySize ;
            objCertificateDetails.SerialNumber = objCertificate.SerialNumber ;
            objCertificateDetails.ServerIssuer = objCertificate.ServerIssuer ;
            objCertificateDetails.ServerSubject = objCertificate.ServerSubject ;
            objCertificateDetails.ValidFrom = objCertificate.ValidFrom ;
            objCertificateDetails.ValidUntil = objCertificate.ValidUntil ;

            if (objCertificate.IsPresent)--> 데이타가 없음.
            {
                System.Security.Cryptography.X509Certificates.X509Certificate cert =
                  new System.Security.Cryptography.X509Certificates.X509Certificate(objCertificate.Certificate);

                string str = cert.GetName();
                // third check is to ensure that the certificate is valid
                String stText = String.Format("Hello {0}, your certificate is{1}valid",
                  cert.GetName(), objCertificate.IsValid ? String.Empty : " NOT");
            }

그럼 수고하세요...ㅠㅠ








[최초 등록일: ]
[최종 수정일: 8/28/2006]


비밀번호

댓글 작성자
 




... 46  47  48  49  50  51  52  53  54  55  56  [57]  58  59  60  ...
NoWriterDateCnt.TitleFile(s)
1241(non...3/22/201421103(글쓴이의 요청으로 삭제합니다.) [4]
1240이석주3/21/201423761인터넷 익스플로러가 hang이 걸리는 현상 문의 [1]파일 다운로드1
1238(non...3/13/201417677(글쓴이의 요청으로 삭제합니다.) [2]
1237(non...3/11/201417723(글쓴이의 요청으로 삭제합니다.) [2]
1236(non...3/11/201418564(글쓴이의 요청으로 삭제합니다.) [2]
1235(non...3/10/201417662(글쓴이의 요청으로 삭제합니다.) [2]
1234(non...3/10/201420792(글쓴이의 요청으로 삭제합니다.) [3]
1233(non...3/9/201418514(글쓴이의 요청으로 삭제합니다.) [4]
1232(non...3/8/201417420(글쓴이의 요청으로 삭제합니다.) [2]
1231(non...3/7/201418712(글쓴이의 요청으로 삭제합니다.) [9]
1230POCO3/7/201419063쓰레드 안에서 DependencyProperty get, set시 또 다른 스레드 오류.. [1]
1229(non...3/6/201419721(글쓴이의 요청으로 삭제합니다.) [11]
1228POCO3/6/201417753안녕하세요. 질문이 있습니다. [1]
1226김형진3/4/201427889안녕하세요 windows azure에 관해 질문했던 사람입니다. [2]
1224(non...3/3/201423240(글쓴이의 요청으로 삭제합니다.) [11]
1223sadf...3/3/201417754아래 질문에 답변 감사드립니다. 한가지 더 궁금한점이 있어 질문드립니다. [1]
1222(non...3/2/201418205(글쓴이의 요청으로 삭제합니다.) [4]
1221(non...3/1/201418636(글쓴이의 요청으로 삭제합니다.) [2]
1220Until2/28/201416936질문드립니다. [1]
1219이성환2/28/201416377string.Join()과 Enumerable.Aggregate()의 차이가 궁금합니다. [2]파일 다운로드1
1218김형진2/25/201418239안녕하세요. window azure에 대해서 질문이 있어서 문의 드립니다 [4]
1217(non...2/23/201418829(글쓴이의 요청으로 삭제합니다.) [1]
1215아리수2/20/201422273C# 공부하면서 WPF에 대한 질문. [2]
1214조광훈2/20/201420282IIS8 응용프로그램 풀 관련 질문 드립니다. [2]파일 다운로드1
1213김태훈2/17/201417460가상화 프로그램 질문입니다. [1]파일 다운로드1
1212조광훈2/13/201416250ISAPI 필터에서 커스텀 헤더 정보 추가 [1]파일 다운로드1
... 46  47  48  49  50  51  52  53  54  55  56  [57]  58  59  60  ...