by Steve [smcgrath12 at hotmail dot com] posted on 2004/06/08 | 
              
                 | 
             
           
        
        
        
        I have a cer file called "Test.cer". I am doing the following in my code.. 
 
Certificate mycer = null; 
mycer = Certificate.CreateFromCerFile(@"Test.cer"); 
 
SecurityOptions sc = new SecurityOptions(SecureProtocol.Tls1,mycer,ConnectionEnd.Client); 
 
m_Socket = new SecureSocket(AddressFamily.InterNetwork,SocketType.Stream,ProtocolType.Tcp,sc); 
 
.... 
.... 
 
Now, the error I am getting when I run the above console app is "If a certificate is specified, it must have a private key." 
 
Any ideas will be appreciated.  |