Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.11.1.2
openapi_sslt.h
Go to the documentation of this file.
1 
9 /**********************************************************************
10 *
11 * Copyright 2023 Broadcom.
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 *
25 ***********************************************************************
26 *
27 * @filename openapi_sslt.h
28 *
29 * @purpose This code implements the OpEN SSLT API
30 *
31 * @component OPEN
32 *
33 * @create 01/30/2023
34 *
35 * @end
36 *
37 *********************************************************************/
38 #ifndef OPENAPI_SSLT_H_INCLUDED
39 #define OPENAPI_SSLT_H_INCLUDED
40 
41 #include "openapi_common.h"
42 
43 typedef enum
44 {
45  OPEN_SSLT_PROTOCOL_SSL30 = 0,
46  OPEN_SSLT_PROTOCOL_TLS10,
47  OPEN_SSLT_PROTOCOL_TLS11,
48  OPEN_SSLT_PROTOCOL_TLS12,
49  OPEN_SSLT_PROTOCOL_TLS13
50 } OPEN_SSLT_PROTOCOL_t;
51 
52 /*************************************************************************/
70  OPEN_CONTROL_t mode);
71 
72 /*************************************************************************/
88  OPEN_CONTROL_t *pMode);
89 
90 /*************************************************************************/
107  uint32_t port);
108 
109 /*************************************************************************/
125  uint32_t *pPort);
126 
127 /*************************************************************************/
145  OPEN_SSLT_PROTOCOL_t protocolId,
146  OPEN_CONTROL_t mode);
147 
148 /*************************************************************************/
165  OPEN_SSLT_PROTOCOL_t protocolId,
166  OPEN_CONTROL_t *pMode);
167 
168 /*************************************************************************/
185  uint32_t timeout);
186 
187 /*************************************************************************/
203  uint32_t *pTimeout);
204 
205 /*************************************************************************/
222  uint32_t timeout);
223 
224 /*************************************************************************/
240  uint32_t *pTimeout);
241 
242 /*************************************************************************/
259  uint32_t maxSession);
260 
261 /*************************************************************************/
277  uint32_t *pSession);
278 
279 /*************************************************************************/
295  OPEN_CONTROL_t *pMode);
296 
297 /*************************************************************************/
314  uint32_t certNum);
315 
316 /*************************************************************************/
333  uint32_t certNum);
334 
335 /*************************************************************************/
369  uint32_t certNum, uint32_t keyLength,
370  open_buffdesc *pCommonName,
371  open_buffdesc *pOrgName,
372  open_buffdesc *pOrgUnit,
373  open_buffdesc *pLocation,
374  open_buffdesc *pState,
375  open_buffdesc *pCountry,
376  open_buffdesc *pEmail,
377  uint32_t days);
378 
379 /*************************************************************************/
398  uint32_t certNum);
399 
400 /*************************************************************************/
416  uint32_t *pCertNum);
417 
418 /*************************************************************************/
434  uint32_t *pCertNum);
435 
436 /*************************************************************************/
454  uint32_t CertNum,
455  OPEN_BOOL_t *pIsExpired);
456 
457 /*************************************************************************/
473  uint32_t certNum);
474 
475 /*************************************************************************/
492  uint32_t certNum,
493  OPEN_BOOL_t *pIsHttpModeEnabled);
494 #endif /* OPENAPI_SSLT_H_INCLUDED */
495 
open_error_t openapiSsltCheckHTTPSEnabledAndOperational(openapiClientHandle_t *client_handle, uint32_t certNum, OPEN_BOOL_t *pIsHttpModeEnabled)
Check if HTTPS mode is enabled and the certificate is active.
open_error_t openapiSsltProtocolLevelGet(openapiClientHandle_t *client_handle, OPEN_SSLT_PROTOCOL_t protocolId, OPEN_CONTROL_t *pMode)
Gets SSL Protocol mode status in use by the SSL Tunnel code.
open_error_t openapiSsltSecurePortGet(openapiClientHandle_t *client_handle, uint32_t *pPort)
Gets secure port number that the SSLT connection is using.
open_error_t openapiSsltCertificateExpiryStatusGet(openapiClientHandle_t *client_handle, uint32_t CertNum, OPEN_BOOL_t *pIsExpired)
Gets status of SSL certificate expiry.
open_error_t openapiSsltProtocolLevelSet(openapiClientHandle_t *client_handle, OPEN_SSLT_PROTOCOL_t protocolId, OPEN_CONTROL_t mode)
Sets SSL Protocol Level to be used by SSL Tunnel codes.
open_error_t openapiSsltCertificateActiveSet(openapiClientHandle_t *client_handle, uint32_t certNum)
Set the active certificate for the SSL tunnel.
open_error_t
OPEN uses these enumerators to indicate the error codes.
open_error_t openapiSsltSessionSoftTimeOutGet(openapiClientHandle_t *client_handle, uint32_t *pTimeout)
Gets SSLT session soft timeout information.
open_error_t openapiSsltCertificateExists(openapiClientHandle_t *client_handle, uint32_t certNum)
Determine if self-signed server certificate exists.
open_error_t openapiSsltCertificateActiveGet(openapiClientHandle_t *client_handle, uint32_t *pCertNum)
Gets the active certificate for the SSL tunnel.
open_error_t openapiSsltCertificateOperActiveGet(openapiClientHandle_t *client_handle, uint32_t *pCertNum)
Gets operational active SSL certificate.
open_error_t openapiSsltAdminModeSet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t mode)
Sets admin Mode of the SSL Tunnel server.
open_error_t openapiSsltOperModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *pMode)
Gets operation mode of SSL Tunnel server.
open_error_t openapiSsltNumSessionsGet(openapiClientHandle_t *client_handle, uint32_t *pSession)
Gets maximum number of SSLT sessions supported.
open_error_t openapiSsltCertificateAndServerKeyExists(openapiClientHandle_t *client_handle, uint32_t certNum)
Determine if self-signed server and rootcert certificates exist.
OPEN_CONTROL_t
OPEN uses these enumerators to indicate enable or disable for a given config or status parameter...
OPEN_BOOL_t
OPEN uses these enumerators to indicate true or false for a given config or status parameter...
open_error_t openapiSsltNumSessionsSet(openapiClientHandle_t *client_handle, uint32_t maxSession)
Sets maximum allowable SSLT sessions.
open_error_t openapiSsltSessionSoftTimeOutSet(openapiClientHandle_t *client_handle, uint32_t timeout)
Sets Soft Timeout (in minutes) for SSLT sessions.
open_error_t openapiSsltCertRemove(openapiClientHandle_t *client_handle, uint32_t certNum)
Remove SSLT certificate.
open_error_t openapiSsltAdminModeGet(openapiClientHandle_t *client_handle, OPEN_CONTROL_t *pMode)
Gets admin mode of SSL Tunnel server.
open_error_t openapiSsltSessionHardTimeOutSet(openapiClientHandle_t *client_handle, uint32_t timeout)
Sets SSLT session hard timeout (in hours).
open_error_t openapiSsltSessionHardTimeOutGet(openapiClientHandle_t *client_handle, uint32_t *pTimeout)
Gets SSLT session hard timeout information (in hours).
open_error_t openapiSsltSecurePortSet(openapiClientHandle_t *client_handle, uint32_t port)
Sets secure port number to listen on for SSLT connections.
open_error_t openapiSsltCertificateGenerate(openapiClientHandle_t *client_handle, uint32_t certNum, uint32_t keyLength, open_buffdesc *pCommonName, open_buffdesc *pOrgName, open_buffdesc *pOrgUnit, open_buffdesc *pLocation, open_buffdesc *pState, open_buffdesc *pCountry, open_buffdesc *pEmail, uint32_t days)
Generate a self-signed server certificate for SSL tunnel.