1 /**************************************************************************/
2 /* */
3 /* Copyright (c) Microsoft Corporation. All rights reserved. */
4 /* */
5 /* This software is licensed under the Microsoft Software License */
6 /* Terms for Microsoft Azure RTOS. Full text of the license can be */
7 /* found in the LICENSE file at https://aka.ms/AzureRTOS_EULA */
8 /* and in the root directory of this software. */
9 /* */
10 /**************************************************************************/
11
12
13 /**************************************************************************/
14 /**************************************************************************/
15 /** */
16 /** NetX Secure Component */
17 /** */
18 /** Datagram Transport Layer Security (DTLS) */
19 /** */
20 /**************************************************************************/
21 /**************************************************************************/
22
23 #define NX_SECURE_SOURCE_CODE
24
25 #include "nx_secure_dtls.h"
26
27 /**************************************************************************/
28 /* */
29 /* FUNCTION RELEASE */
30 /* */
31 /* _nxe_secure_dtls_server_local_certificate_remove PORTABLE C */
32 /* 6.1 */
33 /* AUTHOR */
34 /* */
35 /* Timothy Stapko, Microsoft Corporation */
36 /* */
37 /* DESCRIPTION */
38 /* */
39 /* This function checks for errors when removing a local certificate */
40 /* from a DTLS server. */
41 /* */
42 /* INPUT */
43 /* */
44 /* server_ptr DTLS server control block */
45 /* common_name Certificate Common Name */
46 /* common_name_length Length of Common Name */
47 /* cert_id Numeric ID for certificate */
48 /* */
49 /* OUTPUT */
50 /* */
51 /* status Completion status */
52 /* */
53 /* CALLS */
54 /* */
55 /* _nx_secure_dtls_server_local_certificate_remove */
56 /* Actual function call */
57 /* */
58 /* CALLED BY */
59 /* */
60 /* Application Code */
61 /* */
62 /* RELEASE HISTORY */
63 /* */
64 /* DATE NAME DESCRIPTION */
65 /* */
66 /* 05-19-2020 Timothy Stapko Initial Version 6.0 */
67 /* 09-30-2020 Timothy Stapko Modified comment(s), */
68 /* resulting in version 6.1 */
69 /* */
70 /**************************************************************************/
_nxe_secure_dtls_server_local_certificate_remove(NX_SECURE_DTLS_SERVER * server_ptr,UCHAR * common_name,UINT common_name_length,UINT cert_id)71 UINT _nxe_secure_dtls_server_local_certificate_remove(NX_SECURE_DTLS_SERVER *server_ptr,
72 UCHAR *common_name, UINT common_name_length, UINT cert_id)
73 {
74 #ifdef NX_SECURE_ENABLE_DTLS
75 UINT status;
76
77 if(server_ptr == NX_NULL)
78 {
79 return(NX_PTR_ERROR);
80 }
81
82 /* Call actual function. */
83 status = _nx_secure_dtls_server_local_certificate_remove(server_ptr, common_name, common_name_length, cert_id);
84
85 return(status);
86 #else
87 NX_PARAMETER_NOT_USED(server_ptr);
88 NX_PARAMETER_NOT_USED(common_name);
89 NX_PARAMETER_NOT_USED(common_name_length);
90 NX_PARAMETER_NOT_USED(cert_id);
91
92 return(NX_NOT_SUPPORTED);
93 #endif /* NX_SECURE_ENABLE_DTLS */
94 }
95
96