This document provides a brief description of the sslt OpEN APIs. It provides the following services:
- Sets admin Mode of the SSL Tunnel server.
- Gets admin mode of SSL Tunnel server.
- Sets secure port number to listen on for SSLT connections.
- Gets secure port number that the SSLT connection is using.
- Sets SSL Protocol Level to be used by SSL Tunnel codes.
- Gets SSL Protocol mode status in use by the SSL Tunnel code.
- Sets Soft Timeout (in minutes) for SSLT sessions.
- Gets SSLT session soft timeout information.(in minutes)
- Sets SSLT session hard timeout (in hours).
- Gets SSLT session hard timeout information (in hours).
- Sets maximum allowable SSLT sessions.
- Gets maximum number of SSLT sessions supported.
- Gets operation mode of SSL Tunnel server.
- Determine if self-signed server certificate exists.
- Determine if self-signed server and rootcert certificates exist.
- Generate a self-signed server certificate for SSL tunnel.
- Remove SSLT certificate.
- Gets the active certificate for the SSL tunnel.
- Gets operational active SSL certificate.
- Gets status of SSL certificate expiry.
- Set the active certificate for the SSL tunnel.
- Check if HTTPS mode is enabled and the certificate is active.
Example C Application sslt_example
Initialization
In the main function, the sample application initializes the OpEN API RPC service by calling openapiClientRegister() and waits for the RPC service in switchdrvr to start. A Client Handle is returned by openapiClientRegister() which is used while invoking the OpEN APIs. The application then exercises the associated OpEN APIs and logs informational and/or error messages on the console. The example application runs to its completion and exits.
sslt_example
sslt_example.c is a sample application that demonstrates the use of OpEN's sslt APIs. sslt_example is started from the command line and can be used to exercise the various APIs by specifying arguments on the command line.
Sample Output
- Usage: ./sslt_example <test#> <arg1> <arg2> ...
- Test 1: Sets admin Mode of the SSL Tunnel server: sslt_example 1 <mode>
- Test 2: Gets admin mode of SSL Tunnel server: sslt_example 2
- Test 3: Sets secure port number to listen on for SSLT connections: sslt_example 3 <port>
- Test 4: Gets secure port number that the SSLT connection is using: sslt_example 4
- Test 5: Sets SSL Protocol Level to be used by SSL Tunnel codes: sslt_example 5 <protocolId><mode>
- Test 6: Gets SSL Protocol mode status in use by the SSL Tunnel code: sslt_example 6 <protocolId>
- Test 7: Sets Soft Timeout (in minutes) for SSLT sessions: sslt_example 7 <timeout>
- Test 8: Gets SSLT session soft timeout information.(in minutes): sslt_example 8
- Test 9: Sets SSLT session hard timeout (in hours): sslt_example 9 <timeout>
- Test 10: Gets SSLT session hard timeout information (in hours): sslt_example 10
- Test 11: Sets maximum allowable SSLT sessions: sslt_example 11 <maxSession>
- Test 12: Gets maximum number of SSLT sessions supported: sslt_example 12
- Test 13: Gets operation mode of SSL Tunnel server: sslt_example 13
- Test 14: Determine if self-signed server certificate exists: sslt_example 14 <cerNum>
- Test 15: Determine if self-signed server and rootcert certificates exist: sslt_example 15 <cerNum>
- Test 16: Generate a self-signed server certificate for SSL tunnel: sslt_example 16 <cerNum><keyLength><pCommonName><pOrgName><pOrgUnit><pLocation><pState><pCountry><pEmail><days>
- Test 17: Remove SSLT certificate: sslt_example 17 <cerNum>
- Test 18: Gets the active certificate for the SSL tunnel: sslt_example 18
- Test 19: Gets operational active SSL certificate: sslt_example 19
- Test 20: Gets status of SSL certificate expiry: sslt_example 20 <CerNum>
- Test 21: Set the active certificate for the SSL tunnel: sslt_example 21 <cerNum>
- Test 22: Check if HTTPS mode is enabled and the certificate is active: sslt_example 22 <cerNum>
- Test 23: Run API sanity checks: sslt_example 23
sslt CLI/API Cross Reference