Re: Twisted HTTPS Server-Client Communication problem
Carl Waldbieser <[email protected]> Sun, 22 Oct 2017 20:14:56 -0400
| Newsgroups | gmane.comp.python.twisted.web |
|---|---|
| Message-ID | <CAHPVzqY2fSmENJdNVCaUMd52MsUhQRmxLbFKbsp2mtCjvdD2yg@mail.gmail.com> |
--===============6654478509359412809== Content-Type: multipart/alternative; boundary="001a1147732e643449055c2bb63b" --001a1147732e643449055c2bb63b Content-Type: text/plain; charset="UTF-8" Sounds like maybe you are trying to access the server by an IP address rather than a DNS name? I believe the TLS handshake will fail in this case since it tries to match the host name to the subject name on the certificate or a SAN on the certificate. If you can arrange for DNS or the local resolver to point to the host with a name matching the name on the certificate, that should work. Thanks, Carl Waldbieser On Tue, Oct 17, 2017 at 3:36 AM, Ohad Shai <[email protected]> wrote: > Hi, > > > I have an important question about twisted HTTPS client-server > communication. > > > I ran an HTTPS server with my own certs and tried to communicate with a > twisted HTTPS client with the specific cert. > > > I am getting an error that says: "Invalid DNS-ID". > > > all the error info with all my code is in here: https://gist.github.com/ > anonymous/e46d4d8dc1c102857497cde9e2fc4725#file-gistfile1-txt > Twisted-HTTPS-client-server > <https://gist.github.com/anonymous/e46d4d8dc1c102857497cde9e2fc4725#file-gistfile1-txt> > gist.github.com > Twisted-HTTPS-client-server > > > I will be appreciate if someone has a clue how can I fix this error. > > > Thanks, > > > *Ohad Shai* > Software Engineer, EDR Linux > 972-052-6887792 > [email protected] <[email protected]> > > > _______________________________________________ > Twisted-web mailing list > [email protected] > https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web > > --001a1147732e643449055c2bb63b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Sounds like maybe you are trying to access the server by a= n IP address rather than a DNS name?=C2=A0 I believe the TLS handshake will= fail in this case since it tries to match the host name to the subject nam= e on the certificate or a SAN on the certificate.=C2=A0 If you can arrange = for DNS or the local resolver to point to the host with a name matching the= name on the certificate, that should work.<div><br></div><div>Thanks,</div= ><div>Carl Waldbieser</div><div><br></div></div><div class=3D"gmail_extra">= <br><div class=3D"gmail_quote">On Tue, Oct 17, 2017 at 3:36 AM, Ohad Shai <= span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_b= lank">[email protected]</a>></span> wrote:<br><blockquote class=3D"= gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-= left:1ex"> <div dir=3D"ltr"> <div id=3D"m_6117670615480126372divtagdefaultwrapper" style=3D"font-size:12= pt;color:#000000;font-family:Calibri,Helvetica,sans-serif" dir=3D"ltr"> <p></p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> Hi,</p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> <br> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> I have an important question about twisted HTTPS client-server communicatio= n.</p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> <br> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> I ran an HTTPS server with my own certs and tried to communicate with a twi= sted HTTPS client with the specific cert.</p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> <br> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> I am getting an error that says: "Invalid DNS-ID".</p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> <br> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> all the error info with all my code is in here:=C2=A0<a href=3D"https://gis= t.github.com/anonymous/e46d4d8dc1c102857497cde9e2fc4725#file-gistfile1-txt"= class=3D"m_6117670615480126372OWAAutoLink" id=3D"m_6117670615480126372LPln= k464548" target=3D"_blank">https://gist.github.com/<wbr>anonymous/<wbr>e46d= 4d8dc1c102857497cde9e2fc47<wbr>25#file-gistfile1-txt</a></p> <div id=3D"m_6117670615480126372LPBorder_GT_15070397451480.2587907944564518= " style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-si= ze:16px;margin-bottom:20px;overflow:auto;width:1879px"> <table id=3D"m_6117670615480126372LPContainer_15070397451360.92982797880298= 75" cellspacing=3D"0" style=3D"width:1691px;overflow:auto;padding-top:20px;= padding-bottom:20px;margin-top:20px;border-top:1px dotted rgb(200,200,200);= border-bottom:1px dotted rgb(200,200,200)"> <tbody> <tr valign=3D"top" style=3D"border-spacing:0px"> <td id=3D"m_6117670615480126372x_TextCell_15070397451400.09563524474527507"= colspan=3D"2" style=3D"vertical-align:top;padding:0px"> <div id=3D"m_6117670615480126372LPRemovePreviewContainer_15070397451410.491= 4596452617588"></div> <div id=3D"m_6117670615480126372LPTitle_15070397451410.9598663211779677" st= yle=3D"color:rgb(0,120,215);font-size:21px;font-family:wf_segoe-ui_light,&q= uot;Segoe UI Light","Segoe WP Light","Segoe UI",&q= uot;Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont;line-height:21px= "> <a href=3D"https://gist.github.com/anonymous/e46d4d8dc1c102857497cde9e2fc47= 25#file-gistfile1-txt" rel=3D"noopener noreferrer" id=3D"m_6117670615480126= 372LPUrlAnchor_15070397451430.5598543629427697" style=3D"text-decoration-li= ne:none" target=3D"_blank">Twisted-HTTPS-client-server</a></div> <div id=3D"m_6117670615480126372LPMetadata_15070397451440.18621427807434188= " style=3D"margin:10px 0px 16px;color:rgb(102,102,102);font-family:wf_segoe= -ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-seri= f,serif,EmojiFont;font-size:14px;line-height:14px"> <a href=3D"http://gist.github.com" target=3D"_blank">gist.github.com</a></d= iv> <div id=3D"m_6117670615480126372LPDescription_15070397451460.92042834857850= 43" style=3D"color:rgb(102,102,102);font-family:wf_segoe-ui_normal,"Se= goe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont;f= ont-size:14px;line-height:20px;max-height:100px;overflow:hidden"> Twisted-HTTPS-client-server</div> </td> </tr> </tbody> </table> </div> <br style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-= size:16px"> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> <br> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> I will be appreciate=C2=A0if someone has a clue how can I fix this error.</= p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> <br> </p> <p style=3D"font-family:Calibri,Helvetica,sans-serif,serif,EmojiFont;font-s= ize:16px"> Thanks,</p> <br> <p></p> <p><br> </p> <div id=3D"m_6117670615480126372Signature"> <div id=3D"m_6117670615480126372divtagdefaultwrapper" dir=3D"ltr" style=3D"= font-size:12pt;color:rgb(0,0,0);font-family:Calibri,Helvetica,sans-serif,Em= ojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorE= moji,"Segoe UI Symbol","Android Emoji",EmojiSymbols"> <p></p> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,&quo= t;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"S= egoe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= ;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Se= goe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Seg= oe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;ma= rgin:0px"> <font size=3D"2" color=3D"#212121" style=3D"font-family:Calibri,sans-serif,= serif,EmojiFont"><span style=3D"font-size:11pt"><font color=3D"#548DD4" sty= le=3D"font-family:Tahoma,sans-serif,serif,EmojiFont"><span lang=3D"en-US"><= b>Ohad Shai</b></span></font></span></font></div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,&quo= t;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"S= egoe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= ;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Se= goe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Seg= oe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;ma= rgin:0px"> <font size=3D"2" color=3D"#212121" style=3D"font-family:Calibri,sans-serif,= serif,EmojiFont"><span style=3D"font-size:11pt"><font color=3D"gray" style= =3D"font-family:Tahoma,sans-serif,serif,EmojiFont"><span lang=3D"en-US">Sof= tware Engineer,=C2=A0EDR Linux</span></font></span></font></div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,&quo= t;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"S= egoe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= ;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Se= goe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Seg= oe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;ma= rgin:0px"> <font size=3D"2" color=3D"#212121" style=3D"font-family:Calibri,sans-serif,= serif,EmojiFont"><span style=3D"font-size:11pt"><font color=3D"gray" style= =3D"font-family:Tahoma,sans-serif,serif,EmojiFont"><span lang=3D"it">972-05= 2-6887792</span></font></span></font></div> <div style=3D"font-family:Calibri,Arial,Helvetica,sans-serif,EmojiFont,&quo= t;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"S= egoe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= ;Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Se= goe UI Symbol","Android Emoji",EmojiSymbols,EmojiFont,"= Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Seg= oe UI Symbol","Android Emoji",EmojiSymbols;font-size:16px;ma= rgin:0px"> <font size=3D"2" color=3D"#212121" style=3D"font-family:Calibri,sans-serif,= serif,EmojiFont"><span style=3D"font-size:11pt"><a href=3D"mailto:daniel.do= [email protected]" rel=3D"noopener noreferrer" id=3D"m_6117670615480126372LP= NoLP" target=3D"_blank"><font style=3D"font-family:Tahoma,sans-serif,serif,= EmojiFont"><span id=3D"m_6117670615480126372LPNoLP" lang=3D"fr">ohad.shai@c= yberbit.com</span></font></a></span></font></div> <br> <p></p> </div> </div> </div> </div> <br>______________________________<wbr>_________________<br> Twisted-web mailing list<br> <a href=3D"mailto:[email protected]">Twisted-web@twistedmatrix.= com</a><br> <a href=3D"https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-web" = rel=3D"noreferrer" target=3D"_blank">https://twistedmatrix.com/cgi-<wbr>bin= /mailman/listinfo/twisted-<wbr>web</a><br> <br></blockquote></div><br></div> --001a1147732e643449055c2bb63b-- --===============6654478509359412809== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVHdpc3RlZC13 ZWIgbWFpbGluZyBsaXN0ClR3aXN0ZWQtd2ViQHR3aXN0ZWRtYXRyaXguY29tCmh0dHBzOi8vdHdp c3RlZG1hdHJpeC5jb20vY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL3R3aXN0ZWQtd2ViCg== --===============6654478509359412809==--