-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcie-middleware-fix-cryptopp.patch
More file actions
360 lines (315 loc) · 10.4 KB
/
cie-middleware-fix-cryptopp.patch
File metadata and controls
360 lines (315 loc) · 10.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
From cef3ff0dafeb872eeda5319664e721888fa98c48 Mon Sep 17 00:00:00 2001
From: Luca Magrone <luca@magrone.cc>
Date: Sat, 5 Oct 2024 17:41:21 +0200
Subject: [PATCH] cie-pkcs11: Fix cryptopp headers
Include cryptopp headers from system path
Signed-off-by: Luca Magrone <luca@magrone.cc>
---
cie-pkcs11/CSP/AbilitaCIE.cpp | 6 +++---
cie-pkcs11/CSP/IAS.cpp | 9 ++++-----
cie-pkcs11/CSP/PINManager.cpp | 2 +-
cie-pkcs11/Crypto/Base64.cpp | 4 ++--
cie-pkcs11/Crypto/CryptoUtil.h | 8 ++++----
cie-pkcs11/Crypto/DES3.cpp | 2 +-
cie-pkcs11/Crypto/MAC.cpp | 2 +-
cie-pkcs11/Crypto/RSA.cpp | 6 +++---
cie-pkcs11/Crypto/RSA.h | 2 +-
cie-pkcs11/Crypto/SHA256.cpp | 6 +++---
cie-pkcs11/Crypto/SHA512.cpp | 6 +++---
cie-pkcs11/PCSC/Token.cpp | 2 +-
cie-pkcs11/PKCS11/CIEP11Template.cpp | 4 ++--
cie-pkcs11/PKCS11/PKCS11Functions.cpp | 2 +-
cie-pkcs11/PKCS11/Slot.cpp | 2 +-
cie-pkcs11/Util/Array.cpp | 8 ++++----
cie-pkcs11/Util/CacheLib.cpp | 10 +++++-----
cie-pkcs11/Util/CryptoppUtils.cpp | 6 +++---
cie-pkcs11/Util/CryptoppUtils.h | 6 +++---
cie-pkcs11/Util/IniSettings.cpp | 2 +-
20 files changed, 47 insertions(+), 48 deletions(-)
diff --git a/cie-pkcs11/CSP/AbilitaCIE.cpp b/cie-pkcs11/CSP/AbilitaCIE.cpp
index a12fabd..94fd225 100644
--- a/cie-pkcs11/CSP/AbilitaCIE.cpp
+++ b/cie-pkcs11/CSP/AbilitaCIE.cpp
@@ -18,13 +18,13 @@
#include <string>
#include "AbilitaCIE.h"
#include <string>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
#include "../Crypto/ASNParser.h"
#include <stdio.h>
#include "../Crypto/AES.h"
-#include "../Cryptopp/cryptlib.h"
-#include "../Cryptopp/asn.h"
+#include <cryptopp/cryptlib.h>
+#include <cryptopp/asn.h>
#include "../Util/CryptoppUtils.h"
#include "../Crypto/CryptoUtil.h"
#include "../Sign/CIESign.h"
diff --git a/cie-pkcs11/CSP/IAS.cpp b/cie-pkcs11/CSP/IAS.cpp
index 7ccd379..5ed8fa1 100644
--- a/cie-pkcs11/CSP/IAS.cpp
+++ b/cie-pkcs11/CSP/IAS.cpp
@@ -7,12 +7,11 @@
#include "../Crypto/SHA1.h"
#include "../Crypto/DES3.h"
#include "../Crypto/MAC.h"
-#include "../Cryptopp/misc.h"
#include "../Util/ModuleInfo.h"
-#include "../Cryptopp/misc.h"
-#include "../Cryptopp/cryptlib.h"
-#include "../Cryptopp/asn.h"
-#include "../Cryptopp/queue.h"
+#include <cryptopp/misc.h>
+#include <cryptopp/cryptlib.h>
+#include <cryptopp/asn.h>
+#include <cryptopp/queue.h>
//#include "../res/resource.h"
#include "../Util/CacheLib.h"
diff --git a/cie-pkcs11/CSP/PINManager.cpp b/cie-pkcs11/CSP/PINManager.cpp
index 9b5b961..8bc2ce0 100644
--- a/cie-pkcs11/CSP/PINManager.cpp
+++ b/cie-pkcs11/CSP/PINManager.cpp
@@ -20,7 +20,7 @@
#include <string>
#include "AbilitaCIE.h"
#include <string>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
#include "../LOGGER/Logger.h"
using namespace CieIDLogger;
diff --git a/cie-pkcs11/Crypto/Base64.cpp b/cie-pkcs11/Crypto/Base64.cpp
index 6bb3fc6..7ee896c 100644
--- a/cie-pkcs11/Crypto/Base64.cpp
+++ b/cie-pkcs11/Crypto/Base64.cpp
@@ -1,8 +1,8 @@
#include "../PKCS11/wintypes.h"
#include "Base64.h"
-#include "../Cryptopp/cryptlib.h"
-#include "../Cryptopp/base64.h"
+#include <cryptopp/cryptlib.h>
+#include <cryptopp/base64.h>
//extern CLog Log;
diff --git a/cie-pkcs11/Crypto/CryptoUtil.h b/cie-pkcs11/Crypto/CryptoUtil.h
index 215fc59..321a61d 100644
--- a/cie-pkcs11/Crypto/CryptoUtil.h
+++ b/cie-pkcs11/Crypto/CryptoUtil.h
@@ -9,11 +9,11 @@
#ifndef CryptoUtil_h
#define CryptoUtil_h
-#include "../Cryptopp/modes.h"
-#include "../Cryptopp/aes.h"
-#include "../Cryptopp/filters.h"
+#include <cryptopp/modes.h>
+#include <cryptopp/aes.h>
+#include <cryptopp/filters.h>
#include "../keys.h"
-#include "../Cryptopp/sha.h"
+#include <cryptopp/sha.h>
#include <string>
using namespace CryptoPP;
diff --git a/cie-pkcs11/Crypto/DES3.cpp b/cie-pkcs11/Crypto/DES3.cpp
index 3ddc4b8..816027b 100644
--- a/cie-pkcs11/Crypto/DES3.cpp
+++ b/cie-pkcs11/Crypto/DES3.cpp
@@ -1,6 +1,6 @@
#include "DES3.h"
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
//extern CLog Log;
diff --git a/cie-pkcs11/Crypto/MAC.cpp b/cie-pkcs11/Crypto/MAC.cpp
index d9dbca1..ddf37e8 100644
--- a/cie-pkcs11/Crypto/MAC.cpp
+++ b/cie-pkcs11/Crypto/MAC.cpp
@@ -1,6 +1,6 @@
#include "MAC.h"
-#include "../Cryptopp/hmac.h"
+#include <cryptopp/hmac.h>
//extern CLog Log;
diff --git a/cie-pkcs11/Crypto/RSA.cpp b/cie-pkcs11/Crypto/RSA.cpp
index ac6e737..b520cd6 100644
--- a/cie-pkcs11/Crypto/RSA.cpp
+++ b/cie-pkcs11/Crypto/RSA.cpp
@@ -67,9 +67,9 @@ ByteDynArray CRSA::RSA_PURE(ByteArray &data)
#else
-#include "../Cryptopp/rsa.h"
-#include "../Cryptopp/secblock.h"
-#include "../Cryptopp/pssr.h"
+#include <cryptopp/rsa.h>
+#include <cryptopp/secblock.h>
+#include <cryptopp/pssr.h>
using CryptoPP::InvertibleRSAFunction;
using CryptoPP::RSASS;
diff --git a/cie-pkcs11/Crypto/RSA.h b/cie-pkcs11/Crypto/RSA.h
index 6ddc774..2b4bd3b 100644
--- a/cie-pkcs11/Crypto/RSA.h
+++ b/cie-pkcs11/Crypto/RSA.h
@@ -4,7 +4,7 @@
#include <bcrypt.h>
#else
#include <openssl/rsa.h>
-#include "../Cryptopp/rsa.h"
+#include <cryptopp/rsa.h>
#endif
#include "../PKCS11/wintypes.h"
#include "../Util/Array.h"
diff --git a/cie-pkcs11/Crypto/SHA256.cpp b/cie-pkcs11/Crypto/SHA256.cpp
index b38ccff..65cec1d 100644
--- a/cie-pkcs11/Crypto/SHA256.cpp
+++ b/cie-pkcs11/Crypto/SHA256.cpp
@@ -34,9 +34,9 @@ ByteDynArray CSHA256::Digest(ByteArray &data)
#else
-#include "../Cryptopp/sha.h"
-#include "../Cryptopp/filters.h"
-#include "../Cryptopp/base64.h"
+#include <cryptopp/sha.h>
+#include <cryptopp/filters.h>
+#include <cryptopp/base64.h>
#include "../PKCS11/wintypes.h"
void CSHA256::Init() {
diff --git a/cie-pkcs11/Crypto/SHA512.cpp b/cie-pkcs11/Crypto/SHA512.cpp
index be47506..6c9a6ca 100644
--- a/cie-pkcs11/Crypto/SHA512.cpp
+++ b/cie-pkcs11/Crypto/SHA512.cpp
@@ -35,9 +35,9 @@ ByteDynArray CSHA512::Digest(ByteArray &data)
#else
-#include "../Cryptopp/sha.h"
-#include "../Cryptopp/filters.h"
-#include "../Cryptopp/base64.h"
+#include <cryptopp/sha.h>
+#include <cryptopp/filters.h>
+#include <cryptopp/base64.h>
#include "../PKCS11/wintypes.h"
void CSHA512::Init() {
diff --git a/cie-pkcs11/PCSC/Token.cpp b/cie-pkcs11/PCSC/Token.cpp
index 9be94bd..5ba8e8e 100644
--- a/cie-pkcs11/PCSC/Token.cpp
+++ b/cie-pkcs11/PCSC/Token.cpp
@@ -3,7 +3,7 @@
#include "APDU.h"
#include "../Util/TLV.h"
#include <vector>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
//extern CLog Log;
diff --git a/cie-pkcs11/PKCS11/CIEP11Template.cpp b/cie-pkcs11/PKCS11/CIEP11Template.cpp
index cf86d4e..a4b2c3b 100755
--- a/cie-pkcs11/PKCS11/CIEP11Template.cpp
+++ b/cie-pkcs11/PKCS11/CIEP11Template.cpp
@@ -6,8 +6,8 @@
#include <stdio.h>
#include "../Crypto/AES.h"
#include "../PCSC/PCSC.h"
-#include "../Cryptopp/cryptlib.h"
-#include "../Cryptopp/asn.h"
+#include <cryptopp/cryptlib.h>
+#include <cryptopp/asn.h>
#include "../Util/CryptoppUtils.h"
#include "../LOGGER/Logger.h"
diff --git a/cie-pkcs11/PKCS11/PKCS11Functions.cpp b/cie-pkcs11/PKCS11/PKCS11Functions.cpp
index 397a60b..55ab71a 100755
--- a/cie-pkcs11/PKCS11/PKCS11Functions.cpp
+++ b/cie-pkcs11/PKCS11/PKCS11Functions.cpp
@@ -20,7 +20,7 @@
#include "../Util/SyncroEvent.h"
#include <mutex>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
#include "../Util/UUCByteArray.h"
#include "../LOGGER/Logger.h"
diff --git a/cie-pkcs11/PKCS11/Slot.cpp b/cie-pkcs11/PKCS11/Slot.cpp
index a1ef7cc..2110cdd 100755
--- a/cie-pkcs11/PKCS11/Slot.cpp
+++ b/cie-pkcs11/PKCS11/Slot.cpp
@@ -8,7 +8,7 @@
#include "../Util/util.h"
#include "../Util/SyncroEvent.h"
#include <mutex>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
#include "../LOGGER/Logger.h"
using namespace CieIDLogger;
diff --git a/cie-pkcs11/Util/Array.cpp b/cie-pkcs11/Util/Array.cpp
index 7ed58be..d5a53d9 100644
--- a/cie-pkcs11/Util/Array.cpp
+++ b/cie-pkcs11/Util/Array.cpp
@@ -1,9 +1,9 @@
#include "Array.h"
#include <fstream>
-#include "../Cryptopp/cryptlib.h"
-#include "../Cryptopp/misc.h"
-#include "../Cryptopp/secblock.h"
-#include "../Cryptopp/osrng.h"
+#include <cryptopp/cryptlib.h>
+#include <cryptopp/misc.h>
+#include <cryptopp/secblock.h>
+#include <cryptopp/osrng.h>
#include <openssl/rand.h>
//#include <windows.h>
//#include <bcrypt.h>
diff --git a/cie-pkcs11/Util/CacheLib.cpp b/cie-pkcs11/Util/CacheLib.cpp
index d74dd72..76f4e7d 100644
--- a/cie-pkcs11/Util/CacheLib.cpp
+++ b/cie-pkcs11/Util/CacheLib.cpp
@@ -8,7 +8,7 @@
//#include "sddl.h"
//#include "Aclapi.h"
//#include <VersionHelpers.h>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
#include "util.h"
//#ifndef WIN32
@@ -18,11 +18,11 @@
#include <string>
#include <regex>
-#include "../Cryptopp/modes.h"
-#include "../Cryptopp/aes.h"
-#include "../Cryptopp/filters.h"
+#include <cryptopp/modes.h>
+#include <cryptopp/aes.h>
+#include <cryptopp/filters.h>
#include "../keys.h"
-#include "../Cryptopp/sha.h"
+#include <cryptopp/sha.h>
#include <pwd.h>
diff --git a/cie-pkcs11/Util/CryptoppUtils.cpp b/cie-pkcs11/Util/CryptoppUtils.cpp
index 40b02cc..a45de54 100644
--- a/cie-pkcs11/Util/CryptoppUtils.cpp
+++ b/cie-pkcs11/Util/CryptoppUtils.cpp
@@ -28,9 +28,9 @@
#include "CryptoppUtils.h"
#include <sstream>
-#include "../Cryptopp/base64.h"
-#include "../Cryptopp/hex.h"
-#include "../Cryptopp/osrng.h"
+#include <cryptopp/base64.h>
+#include <cryptopp/hex.h>
+#include <cryptopp/osrng.h>
using namespace CryptoPP;
diff --git a/cie-pkcs11/Util/CryptoppUtils.h b/cie-pkcs11/Util/CryptoppUtils.h
index 979c04f..55c09db 100644
--- a/cie-pkcs11/Util/CryptoppUtils.h
+++ b/cie-pkcs11/Util/CryptoppUtils.h
@@ -30,9 +30,9 @@
#include <string>
-#include "../Cryptopp/eccrypto.h"
-#include "../Cryptopp/rsa.h"
-#include "../Cryptopp/secblock.h"
+#include <cryptopp/eccrypto.h>
+#include <cryptopp/rsa.h>
+#include <cryptopp/secblock.h>
#include "../PKCS11/wintypes.h"
#define Buffer std::vector<unsigned char>
diff --git a/cie-pkcs11/Util/IniSettings.cpp b/cie-pkcs11/Util/IniSettings.cpp
index cd39b5a..cf529f0 100644
--- a/cie-pkcs11/Util/IniSettings.cpp
+++ b/cie-pkcs11/Util/IniSettings.cpp
@@ -1,7 +1,7 @@
#include "IniSettings.h"
#include "../Crypto/Base64.h"
#include <sstream>
-#include "../Cryptopp/misc.h"
+#include <cryptopp/misc.h>
std::vector<IniSettings*> _iniSettings;
--
2.43.5