Glossary Item Box

PowerTCP SSL Sockets for .NET

Using The CertificateListForm Object

The CertificateListForm Object is a visual control which displays and allows selection of certificates available on the local machine. This form is particularly useful in making certificate selection easier when starting a secure server or when using a secure client and the server requests client authentication.

Standard usage of the CertificateListForm would be to create a new instance, passing in the parameters controlling which certificates are displayed to the user. Display the CertificateListForm to the user. When the user makes a selection, check CertificateListForm.SelectedCertificate to get an instance of the Certificate object representing the certificate the user selected

 

To use the CertificateListForm

  1. Add a reference in your project to the Forms dll.
  2. Create the CertificateListForm and display it to the user.
    [C#]
    // Create a new CertificateListForm, showing all locations and names.
    CertificateListForm certform  = new CertificateListForm(true, true);
    
    // Display the CertificateListForm to the user.
    if(certform.ShowDialog() == DialogResult.OK)
    {
       // User has selected a certificate. Set the Certificate property
       server1.Certificate = certform.SelectedCertificate;
    }
    else
    {
       // User did not choose a certificate.
       MessageBox.Show("Error. You must choose a certificate");
    }
    
    [Visual Basic]
    ' Create a new CertificateListForm, showing all locations and names.
    Dim certform As New CertificateListForm(true, true)
    
    ' Display the CertificateListForm to the user.
    If certform.ShowDialog() == DialogResult.OK Then
       ' User has selected a certificate. Set the Certificate property
       server1.Certificate = certform.SelectedCertificate
    Else
       ' User did not choose a certificate.
       MessageBox.Show("Error. You must choose a certificate")
    End If
    

In This Section

Security Overview
Provides an overview of basic security concepts such as digital certificates and authentication.
PowerTCP Secure Implementation Explained
Discusses how security is implemented in PowerTCP SSL Sockets for .NET
Creating an SSL Client
Discusses how to create an SSL Client using the Tcp component.
Creating an SSL Server
Discusses how to create an SSL Server using the Server component.
Using the CertificateListForm Object
Demonstrates how to use the CertificateListForm to assist users in selecting a certificate.
Using MMC to Manage SSL Certificates
Discusses how to use the Microsoft Management Console to manage SSL certificates.
Simple Encryption/Decryption
Demonstrates how to use the SymmetricCryptoStream to encrypt/decrypt stream-based data.
Windows 95/98 Security Compatibility
Discusses compatibility issues with Windows 95 and 98.

 

 


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.