1
10
13
14
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
86
87
91
92
93
97
98
99
100
101
102
103
104
105
106
107
...
...
...
#define NX_SECURE_SOURCE_CODE
#include "nx_secure_tls.h"
NX_SECURE_CALLER_CHECKING_EXTERNS
...
...
UINT _nxe_secure_tls_remote_certificate_buffer_allocate(NX_SECURE_TLS_SESSION *tls_session, UINT certs_number, VOID *certificate_buffer, ULONG buffer_size)
{
UINT status;
if(tls_session == NX_NULL || certificate_buffer == NX_NULL)
{
return(NX_PTR_ERROR);
}if (tls_session == NX_NULL || certificate_buffer == NX_NULL) { ... }
if(certs_number == 0 || buffer_size == 0)
{
return(NX_INVALID_PARAMETERS);
}if (certs_number == 0 || buffer_size == 0) { ... }
if(tls_session -> nx_secure_tls_id != NX_SECURE_TLS_ID)
{
return(NX_SECURE_TLS_SESSION_UNINITIALIZED);
}if (tls_session -> nx_secure_tls_id != NX_SECURE_TLS_ID) { ... }
NX_THREADS_ONLY_CALLER_CHECKING
status = _nx_secure_tls_remote_certificate_buffer_allocate(tls_session, certs_number, certificate_buffer, buffer_size);
return(status);
}{ ... }