Microsoft MVP성태의 닷넷 이야기
서버인증서및클라이언트인증서 발급 [링크 복사], [링크+제목 복사],
조회: 14033
글쓴 사람
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]


비밀번호

댓글 작성자
 




... 76  77  78  79  [80]  81  82  83  84  85  86  87  88  89  90  ...
NoWriterDateCnt.TitleFile(s)
493안연준10/25/200613861스마트클라이언트 배포에서 Config 내용이 이해가 안되요
494안연준10/25/200612063    답변글 [답변]: 스마트클라이언트 배포에서 Config 내용이 이해가 안되요 [2]
489안연준10/23/200613208스마트 클라이언트 배포시 문제점
491안연준10/24/200613892    답변글 [답변]: 스마트 클라이언트 배포시 문제점 [2]
492안연준10/24/200612895        답변글 [답변]: [답변]: 스마트 클라이언트 배포시 문제점
488안연준10/23/200612644닷넷 프레임워크 때문에 일어난 어의없는 상황 [2]
484서민균10/20/200612778스마트 클라이언트 인쇄질문 올린 사람입니다.
486정성태10/22/200614017    답변글 [답변]: 스마트 클라이언트 인쇄질문 올린 사람입니다.
483guest10/19/200613040asp.net 에서 Com+ 등록된 dll 의 차이점이 무엇인지요?
485정성태10/22/200613688    답변글 [답변]: asp.net 에서 Com+ 등록된 dll 의 차이점이 무엇인지요?
490deve...10/23/200616818        답변글 [답변]: [답변]: asp.net 에서 Com+ 등록된 dll 의 차이점이 무엇인지요? [1]
478서민균10/17/200614846스마트 클라이언트로 만든 컴포넌트가 인쇄가 안되요.....ㅜㅜ [5]
477sagi...10/15/200614127bho 와 mfc 메시지 전송 관련 질문입니다.
479정성태10/17/200615980    답변글 [답변]: bho 와 mfc 메시지 전송 관련 질문입니다.
480sagi...10/17/200613914        답변글 [답변]: 감사합니다. [1]
481sagi...10/19/200613819            답변글 [답변]: 죄송합니다 .. 한가지 더 여쭤 볼께요
482정성태10/19/200613349                답변글 [답변]: [답변]: 죄송합니다 .. 한가지 더 여쭤 볼께요
496sagi...10/27/200614030                    답변글 [답변]: 감사드립니다.
476문태정10/11/200616390FarPointSpread로 출력 시 시트 암호설정문제 [1]
474임경훈10/9/200616914세션값이 유지가 안되는데요? [1]
470쿠리마9/29/200613182고수님들께 질문 올립니다. (C# COM Server에서 C++ Client에게 string맴버 포함한 구조체 배열 넘기기)파일 다운로드1
473정성태10/5/200615233    답변글 [답변]: 고수님들께 질문 올립니다. (C# COM Server에서 C++ Client에게 string맴버 포함한 구조체 배열 넘기기) [3]파일 다운로드1
469이방은9/29/200612880질문이 있어요.. [2]
466이승기9/25/200612666Attribute를 이용한 COM 구현 시 interface의 상속 [1]
467이승기9/27/200612238    답변글 [답변]: Attribute를 이용한 COM 구현 시 interface의 상속
4659/23/200611771vb.net에서 c에서 보내는 Post메쎄지를 잡아서 처리할수 없을가요? [1]
... 76  77  78  79  [80]  81  82  83  84  85  86  87  88  89  90  ...