Skip to content

Commit 477236b

Browse files
committed
Addressing PR comments and other fixes, part 2
1 parent ec5ebb8 commit 477236b

23 files changed

+80
-66
lines changed

kmipclient/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ set(CMAKE_CXX_STANDARD 23)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66
set(CMAKE_CXX_EXTENSIONS OFF) # Optional, but recommended for standard compliance
77

8+
include_directories(${PROJECT_SOURCE_DIR}/include)
89
add_library(
910
kmipclient
1011
STATIC
@@ -13,7 +14,7 @@ add_library(
1314
include/NetClient.hpp
1415
src/NetClientOpenSSL.cpp
1516
include/NetClientOpenSSL.hpp
16-
include/v_expected.hpp
17+
include/ve_expected.hpp
1718
include/kmip_data_types.hpp
1819
src/RequestFactory.cpp
1920
src/RequestFactory.hpp

kmipclient/examples/example_activate.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
//
22
// Created by al on 02.04.25.
33
//
4-
#include "../include/KmipClient.hpp"
5-
#include "../include/NetClientOpenSSL.hpp"
6-
#include "../include/kmipclient_version.hpp"
74

85
#include <iostream>
96

7+
#include "KmipClient.hpp"
8+
#include "NetClientOpenSSL.hpp"
9+
#include "kmipclient_version.hpp"
10+
1011
using namespace kmipclient;
1112

1213
int

kmipclient/examples/example_create_aes.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11

22

3-
#include "../include/Kmip.hpp"
4-
#include "../include/KmipClient.hpp"
5-
#include "../include/NetClientOpenSSL.hpp"
3+
64
#include <iostream>
75

6+
#include "Kmip.hpp"
7+
#include "KmipClient.hpp"
8+
#include "kmipclient_version.hpp"
9+
810
using namespace kmipclient;
911

1012
int

kmipclient/examples/example_destroy.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
// Created by al on 02.04.25.
33
//
44

5-
#include "../include/KmipClient.hpp"
6-
#include "../include/NetClientOpenSSL.hpp"
7-
#include "../include/kmipclient_version.hpp"
85

96
#include <iostream>
107

8+
#include "KmipClient.hpp"
9+
#include "NetClientOpenSSL.hpp"
10+
#include "kmipclient_version.hpp"
11+
1112
using namespace kmipclient;
1213

1314
int

kmipclient/examples/example_get.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22

3-
#include "../include/KmipClient.hpp"
4-
#include "../include/NetClientOpenSSL.hpp"
5-
#include "../include/kmipclient_version.hpp"
63

74
#include <iostream>
85

6+
#include "KmipClient.hpp"
7+
#include "NetClientOpenSSL.hpp"
8+
#include "kmipclient_version.hpp"
9+
910
using namespace kmipclient;
1011

1112
void

kmipclient/examples/example_get_all_ids.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22

3-
#include "../include/KmipClient.hpp"
4-
#include "../include/NetClientOpenSSL.hpp"
5-
#include "../include/kmipclient_version.hpp"
6-
73
#include <iostream>
84

5+
#include "KmipClient.hpp"
6+
#include "NetClientOpenSSL.hpp"
7+
#include "kmipclient_version.hpp"
8+
99
using namespace kmipclient;
1010

1111
int
@@ -21,7 +21,7 @@ main (int argc, char **argv)
2121
NetClientOpenSSL net_client (argv[1], argv[2], argv[3], argv[4], argv[5], 200);
2222
KmipClient client (net_client);
2323

24-
const auto opt_ids = client.op_all (KMIP_ENTITY_SYMMETRIC_KEY);
24+
const auto opt_ids = client.op_all (KMIP_OBJTYPE_SYMMETRIC_KEY);
2525
if (opt_ids.has_value ())
2626
{
2727
std::cout << "Found IDs of symmetric keys:" << std::endl;
@@ -35,7 +35,7 @@ main (int argc, char **argv)
3535
std::cerr << "Can not get keys." << " Cause: " << opt_ids.error ().message << std::endl;
3636
};
3737

38-
const auto opt_ids_s = client.op_all (KMIP_ENTITY_SECRET_DATA);
38+
const auto opt_ids_s = client.op_all ( KMIP_OBJTYPE_SECRET_DATA);
3939
if (opt_ids.has_value ())
4040
{
4141
std::cout << "Found IDs of secret data:" << std::endl;

kmipclient/examples/example_get_name.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22

3-
#include "../include/KmipClient.hpp"
4-
#include "../include/NetClientOpenSSL.hpp"
5-
#include "../include/kmipclient_version.hpp"
63

74
#include <iostream>
85

6+
#include "KmipClient.hpp"
7+
#include "NetClientOpenSSL.hpp"
8+
#include "kmipclient_version.hpp"
9+
910
using namespace kmipclient;
1011

1112
int

kmipclient/examples/example_get_secret.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22

3-
#include "../include/KmipClient.hpp"
4-
#include "../include/NetClientOpenSSL.hpp"
5-
#include "../include/kmipclient_version.hpp"
63

74
#include <iostream>
85

6+
#include "KmipClient.hpp"
7+
#include "NetClientOpenSSL.hpp"
8+
#include "kmipclient_version.hpp"
9+
910
using namespace kmipclient;
1011

1112
int

kmipclient/examples/example_locate.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22

3-
#include "../include/KmipClient.hpp"
4-
#include "../include/NetClientOpenSSL.hpp"
5-
#include "../include/kmipclient_version.hpp"
6-
73
#include <iostream>
84

5+
#include "KmipClient.hpp"
6+
#include "NetClientOpenSSL.hpp"
7+
#include "kmipclient_version.hpp"
8+
99
using namespace kmipclient;
1010

1111
int
@@ -23,7 +23,7 @@ main (int argc, char **argv)
2323

2424
std::cout << "Searching for name: " << argv[6] << std::endl;
2525

26-
const auto opt_ids = client.op_locate_by_name (argv[6], KMIP_ENTITY_SYMMETRIC_KEY);
26+
const auto opt_ids = client.op_locate_by_name (argv[6], KMIP_OBJTYPE_SYMMETRIC_KEY);
2727
if (opt_ids.has_value ())
2828
{
2929
std::cout << "Found IDs of symmetric keys:" << std::endl;
@@ -37,7 +37,7 @@ main (int argc, char **argv)
3737
std::cerr << "Can not get keys with name:" << argv[6] << " Cause: " << opt_ids.error ().message << std::endl;
3838
};
3939

40-
const auto opt_ids_s = client.op_locate_by_name (argv[6], KMIP_ENTITY_SECRET_DATA);
40+
const auto opt_ids_s = client.op_locate_by_name (argv[6], KMIP_OBJTYPE_SECRET_DATA);
4141
if (opt_ids.has_value ())
4242
{
4343
std::cout << "Found IDs of secret data:" << std::endl;

kmipclient/examples/example_locate_by_group.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11

22

3-
#include "../include/KmipClient.hpp"
4-
#include "../include/NetClientOpenSSL.hpp"
5-
#include "../include/kmipclient_version.hpp"
6-
73
#include <iostream>
84

5+
#include "KmipClient.hpp"
6+
#include "NetClientOpenSSL.hpp"
7+
#include "kmipclient_version.hpp"
8+
99
using namespace kmipclient;
1010

1111
int
@@ -24,7 +24,7 @@ main (int argc, char **argv)
2424

2525
std::cout << "Searching for group with name: " << argv[6] << std::endl;
2626

27-
const auto opt_ids = client.op_locate_by_group (argv[6], KMIP_ENTITY_SYMMETRIC_KEY);
27+
const auto opt_ids = client.op_locate_by_group (argv[6], KMIP_OBJTYPE_SYMMETRIC_KEY);
2828
if (opt_ids.has_value ())
2929
{
3030
std::cout << "Found IDs of symmetric keys:";
@@ -39,7 +39,7 @@ main (int argc, char **argv)
3939
<< std::endl;
4040
};
4141

42-
const auto opt_ids_s = client.op_locate_by_group (argv[6], KMIP_ENTITY_SECRET_DATA);
42+
const auto opt_ids_s = client.op_locate_by_group (argv[6], KMIP_OBJTYPE_SECRET_DATA);
4343
if (opt_ids.has_value ())
4444
{
4545
std::cout << "Found IDs of secret data:";

0 commit comments

Comments
 (0)