Fix DER vs PEM confusion in node_frontend_test (#3916) (#3989)

This commit is contained in:
github-actions[bot] 2022-06-28 15:27:37 +01:00 коммит произвёл GitHub
Родитель 7250cacbef
Коммит e15db779dc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -211,13 +211,14 @@ TEST_CASE("Add a node to an opening service")
crypto::KeyPairPtr kp = crypto::make_key_pair();
auto v = crypto::make_verifier(
kp->self_sign("CN=Other Joiner", valid_from, valid_to));
const auto caller = v->cert_der();
const auto new_caller = v->cert_pem();
// Network node info is empty (same as before)
JoinNetworkNodeToNode::In join_input;
join_input.public_encryption_key = node_public_encryption_key;
auto http_response = frontend_process(frontend, join_input, "join", caller);
auto http_response =
frontend_process(frontend, join_input, "join", new_caller);
check_error(http_response, HTTP_STATUS_BAD_REQUEST);
check_error_message(http_response, "A node with the same node address");
@ -290,12 +291,13 @@ TEST_CASE("Add a node to an open service")
crypto::KeyPairPtr kp = crypto::make_key_pair();
auto v =
crypto::make_verifier(kp->self_sign("CN=Joiner", valid_from, valid_to));
const auto caller = v->cert_der();
const auto new_caller = v->cert_pem();
// Network node info is empty (same as before)
JoinNetworkNodeToNode::In join_input;
auto http_response = frontend_process(frontend, join_input, "join", caller);
auto http_response =
frontend_process(frontend, join_input, "join", new_caller);
check_error(http_response, HTTP_STATUS_BAD_REQUEST);
check_error_message(http_response, "A node with the same node address");