mirror of
https://github.com/open62541/open62541.git
synced 2026-10-23 00:38:40 +08:00
ci: fix PR security build and SKS test failures
This commit is contained in:
committed by
Julius Pfrommer
parent
2bd3f37589
commit
ff2df28848
@@ -759,14 +759,15 @@ UA_CertificateUtils_verifyApplicationUri(const UA_ByteString *certificate,
|
||||
for(int i = 0; i < sk_GENERAL_NAME_num(pNames); i++) {
|
||||
GENERAL_NAME *value = sk_GENERAL_NAME_value(pNames, i);
|
||||
if(value->type == GEN_URI) {
|
||||
subjectURI.length = (size_t) (value->d.ia5->length);
|
||||
subjectURI.length = (size_t)ASN1_STRING_length(value->d.ia5);
|
||||
subjectURI.data = (UA_Byte*)UA_malloc(subjectURI.length);
|
||||
if(!subjectURI.data) {
|
||||
X509_free(certificateX509);
|
||||
sk_GENERAL_NAME_pop_free(pNames, GENERAL_NAME_free);
|
||||
return UA_STATUSCODE_BADSECURITYCHECKSFAILED;
|
||||
}
|
||||
(void)memcpy(subjectURI.data, value->d.ia5->data, subjectURI.length);
|
||||
(void)memcpy(subjectURI.data, ASN1_STRING_get0_data(value->d.ia5),
|
||||
subjectURI.length);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -451,7 +451,11 @@ START_TEST(GetSecurityKeysAllocatesByteStringArray) {
|
||||
0, UA_NS0ID_PUBLISHSUBSCRIBE_GETSECURITYKEYS);
|
||||
request.inputArgumentsSize = 3;
|
||||
request.inputArguments = getInput;
|
||||
/* This test exercises allocation, so give the admin Session a user ID
|
||||
* to pass the GetSecurityKeys access check. */
|
||||
server->adminSession.clientUserIdOfSession = UA_STRING("testuser");
|
||||
UA_CallMethodResult result = UA_Server_call(server, &request);
|
||||
server->adminSession.clientUserIdOfSession = UA_STRING_NULL;
|
||||
server->adminSession.channel = NULL;
|
||||
UA_SecureChannel_clear(&channel);
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@ EOF
|
||||
|
||||
x86_64-w64-mingw32-gcc -D_WIN32_WINNT=0x0600 \
|
||||
-Wall -Werror amalgamation_none_smoke.c open62541.c \
|
||||
-o amalgamation_none_smoke.exe -lws2_32 -liphlpapi
|
||||
-o amalgamation_none_smoke.exe -lws2_32 -liphlpapi -lbcrypt
|
||||
}
|
||||
|
||||
function build_amalgamation_mt {
|
||||
|
||||
@@ -59,7 +59,7 @@ int main(void) {
|
||||
}
|
||||
EOF
|
||||
|
||||
${CC:-gcc} -I. amalgamation_none_smoke.c open62541.c -o amalgamation_none_smoke.exe -lws2_32 -liphlpapi
|
||||
${CC:-gcc} -I. amalgamation_none_smoke.c open62541.c -o amalgamation_none_smoke.exe -lws2_32 -liphlpapi -lbcrypt
|
||||
|
||||
rm -r *
|
||||
|
||||
|
||||
Reference in New Issue
Block a user