Open Ethernet Networking (OpEN) API Guide and Reference Manual  3.12.0.1
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 /*************************************************************************/
71  OPEN_CONTROL_t mode);
72 
73 /*************************************************************************/
90  OPEN_CONTROL_t *pMode);
91 
92 /*************************************************************************/
110  uint32_t port);
111 
112 /*************************************************************************/
129  uint32_t *pPort);
130 
131 /*************************************************************************/
150  OPEN_SSLT_PROTOCOL_t protocolId,
151  OPEN_CONTROL_t mode);
152 
153 /*************************************************************************/
171  OPEN_SSLT_PROTOCOL_t protocolId,
172  OPEN_CONTROL_t *pMode);
173 
174 /*************************************************************************/
192  uint32_t timeout);
193 
194 /*************************************************************************/
211  uint32_t *pTimeout);
212 
213 /*************************************************************************/
231  uint32_t timeout);
232 
233 /*************************************************************************/
250  uint32_t *pTimeout);
251 
252 /*************************************************************************/
270  uint32_t maxSession);
271 
272 /*************************************************************************/
289  uint32_t *pSession);
290 
291 /*************************************************************************/
308  OPEN_CONTROL_t *pMode);
309 
310 /*************************************************************************/
328  uint32_t certNum);
329 
330 /*************************************************************************/
348  uint32_t certNum);
349 
350 /*************************************************************************/
385  uint32_t certNum, uint32_t keyLength,
386  open_buffdesc *pCommonName,
387  open_buffdesc *pOrgName,
388  open_buffdesc *pOrgUnit,
389  open_buffdesc *pLocation,
390  open_buffdesc *pState,
391  open_buffdesc *pCountry,
392  open_buffdesc *pEmail,
393  uint32_t days);
394 
395 /*************************************************************************/
415  uint32_t certNum);
416 
417 /*************************************************************************/
434  uint32_t *pCertNum);
435 
436 /*************************************************************************/
453  uint32_t *pCertNum);
454 
455 /*************************************************************************/
474  uint32_t CertNum,
475  OPEN_BOOL_t *pIsExpired);
476 
477 /*************************************************************************/
494  uint32_t certNum);
495 
496 /*************************************************************************/
514  uint32_t certNum,
515  OPEN_BOOL_t *pIsHttpModeEnabled);
516 
517 /*************************************************************************/
533  uint32_t *pMinKeyLength,
534  uint32_t *pMaxKeyLength);
535 
536 /*************************************************************************/
552  uint32_t *pMinSubjectName,
553  uint32_t *pMaxSubjectName);
554 
555 /*************************************************************************/
570  uint32_t *pMinValidDays,
571  uint32_t *pMaxValidDays);
572 
573 /*************************************************************************/
586  uint32_t *pCountryName);
587 #endif /* OPENAPI_SSLT_H_INCLUDED */
588 
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 openapiSsltCertificateSubjectNameSizeGet(openapiClientHandle_t *client_handle, uint32_t *pMinSubjectName, uint32_t *pMaxSubjectName)
Get the minimum and maximum supported sizes of certificate Subject domain name.
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 openapiSsltCertificateKeyLengthGet(openapiClientHandle_t *client_handle, uint32_t *pMinKeyLength, uint32_t *pMaxKeyLength)
Get the minimum and maximum supported sizes of certificate keylength.
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 openapiSsltCertificateValidDaysGet(openapiClientHandle_t *client_handle, uint32_t *pMinValidDays, uint32_t *pMaxValidDays)
Get the minimum and maximum supported duration of certificate validity.
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 openapiSsltCertificateCountryNameSizeGet(openapiClientHandle_t *client_handle, uint32_t *pCountryName)
Get certificate country name size.
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.