Skip to content

Commit

Permalink
Rebase fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
qpernil committed Dec 31, 2021
1 parent aabe86c commit b66d8b8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion cmake/SecurityFlags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (CMAKE_C_COMPILER_ID STREQUAL "Clang" OR
add_compile_options (-Wall -Wextra -Werror)
add_compile_options (-Wformat -Wformat-nonliteral -Wformat-security)
add_compile_options (-Wshadow)
add_compile_options (-Wcast-qual)
#add_compile_options (-Wcast-qual)
add_compile_options (-Wmissing-prototypes)
add_compile_options (-Wbad-function-cast)
add_compile_options (-pedantic -pedantic-errors)
Expand Down
2 changes: 1 addition & 1 deletion pkcs11/tests/rsa_enc_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#include <openssl/rand.h>
#include <openssl/err.h>

#include "../pkcs11.h"
#include "../pkcs11y.h"
#include "common.h"

#define BUFSIZE 1024
Expand Down
25 changes: 11 additions & 14 deletions pkcs11/yubihsm_pkcs11.c
Original file line number Diff line number Diff line change
Expand Up @@ -5115,37 +5115,34 @@ CK_DEFINE_FUNCTION(CK_RV, C_GetInterface)
}
size_t i;
for (i = 0; i < sizeof(interfaces_list) / sizeof(interfaces_list[0]); i++) {
CK_FUNCTION_LIST_PTR function_list =
CK_FUNCTION_LIST_PTR func_list =
(CK_FUNCTION_LIST_PTR) interfaces_list[i].pFunctionList;
if ((flags & interfaces_list[i].flags) != flags) {
DBG_INFO("C_GetInterface skipped interface %zu (%s %u.%u) because flags "
"was %lu",
i, interfaces_list[i].pInterfaceName,
function_list->version.major, function_list->version.minor,
flags);
i, interfaces_list[i].pInterfaceName, func_list->version.major,
func_list->version.minor, flags);
continue;
}
if (pVersion && (pVersion->major != function_list->version.major ||
pVersion->minor != function_list->version.minor)) {
if (pVersion && (pVersion->major != func_list->version.major ||
pVersion->minor != func_list->version.minor)) {
DBG_INFO("C_GetInterface skipped interface %zu (%s %u.%u) because "
"pVersion was %u.%u",
i, interfaces_list[i].pInterfaceName,
function_list->version.major, function_list->version.minor,
pVersion->major, pVersion->minor);
i, interfaces_list[i].pInterfaceName, func_list->version.major,
func_list->version.minor, pVersion->major, pVersion->minor);
continue;
}
if (pInterfaceName && strcmp((char *) pInterfaceName,
(char *) interfaces_list[i].pInterfaceName)) {
DBG_INFO("C_GetInterface skipped interface %zu (%s %u.%u) because "
"pInterfacename was %s",
i, interfaces_list[i].pInterfaceName,
function_list->version.major, function_list->version.minor,
pInterfaceName);
i, interfaces_list[i].pInterfaceName, func_list->version.major,
func_list->version.minor, pInterfaceName);
continue;
}
DBG_INFO("C_GetInterface selected interface %zu (%s %u.%u)", i,
interfaces_list[i].pInterfaceName, function_list->version.major,
function_list->version.minor);
interfaces_list[i].pInterfaceName, func_list->version.major,
func_list->version.minor);
*ppInterface = (CK_INTERFACE_PTR) &interfaces_list[i];
rv = CKR_OK;
break;
Expand Down

0 comments on commit b66d8b8

Please sign in to comment.