Article View: borland.public.cppbuilder.internet.socket
Article #4216Indy.Sockets.Security.Tls.ServerIOHandlerTls
From: Lynn
Date: Mon, 21 Mar 2005 23:13
Date: Mon, 21 Mar 2005 23:13
19 lines
1947 bytes
1947 bytes
Hi, everyone
Just want to know if there is anybody successfully Indy.Sockets.Security.Tls.ServerIOHandlerTls for server-side autherntication and how to set properties for options.
I created three files:
cert.pem, root.pem and key.pem
and snippet:
Indy.Sockets.Security.Tls.ServerIOHandlerTls tls = new Indy.Sockets.Security.Tls.ServerIOHandlerTls();
tls.Options.LoadPrivateKeyFromFile("c:\\certificate\\key.pem","password");
tls.Options.LoadPublicCertificateFromFile("c:\\certificate\\cert.pem");
I also hook up tls with httpserver by this:
httpserver.IOHandler = (Indy.Sockets.ServerIOHandler)tls;
I got error:
System.Security.Cryptography.CryptographicException: Invalid data and/or password
at Mono.Security.Authenticode.PrivateKey..ctor(Byte[] data, String password)
at Mono.Security.Authenticode.PrivateKey.CreateFromFile(String filename, String password)
at Indy.Sockets.Security.Tls.TlsServerOptions.LoadPrivateKeyFromFile(String AFileName, String APassword)
I don't know what is wrong.
Any advice will be very helpful.
Liying
Technical Details
Message-ID:
<423f5520$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 11508e,fa5c0f5432fed18a,start X-Google-Attributes: gid11508e,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Lynn" <lya91@hotmail.com> Sender: "Lynn" <lya91@hotmail.com> Reply-To: "Lynn" <lya91@hotmail.com> Subject: Indy.Sockets.Security.Tls.ServerIOHandlerTls Newsgroups: borland.public.cppbuilder.internet.socket X-User-Info: 64.80.247.100 NNTP-Posting-Host: 207.105.83.66 Message-ID: <423f5520$1@newsgroups.borland.com> Date: 21 Mar 2005 15:13:36 -0800 X-Trace: newsgroups.borland.com 1111446816 207.105.83.66 (21 Mar 2005 15:13:36 -0800) Lines: 20 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!feeder2.on.meganewsservers.com!meganewsservers.com!textfeed1.on.meganewsservers.com!38.119.100.83.MISMATCH!news-out.nntp.be!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail