Skip to content

Commit d671ffb

Browse files
committed
Use patches unmodified by git's autocrlf function
[skip changelog] Signed-off-by: Luca Magrone <luca@magrone.cc>
1 parent 232273a commit d671ffb

8 files changed

Lines changed: 491 additions & 491 deletions

cie-middleware-cie-pkcs11-fixup.patch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From e2a8d7f6e9e3552616cbfddbe99ca220d8772d17 Mon Sep 17 00:00:00 2001
1+
From f6be5ce7351a2a2516253198f7a57c004ff0f4c6 Mon Sep 17 00:00:00 2001
22
From: Luca Magrone <luca@magrone.cc>
33
Date: Sat, 5 Oct 2024 00:13:40 +0200
44
Subject: [PATCH] cie-pkcs11: Fix ambiguous 'byte' type

cie-middleware-common-fixup.patch

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -21,66 +21,66 @@ index c7d4d14..7ccd379 100644
2121
--- a/cie-pkcs11/CSP/IAS.cpp
2222
+++ b/cie-pkcs11/CSP/IAS.cpp
2323
@@ -653,11 +653,11 @@ ByteDynArray IAS::SM(ByteArray &keyEnc, ByteArray &keySig, ByteArray &apdu, Byte
24-
init_func
25-
26-
std::string dmp;
27-
- ODS(dumpHexData(seq, dmp).c_str());
28-
+ ODS("%s\n", dumpHexData(seq, dmp).c_str());
29-
30-
increment(seq);
31-
32-
- ODS(dumpHexData(seq, dmp).c_str());
33-
+ ODS("%s\n", dumpHexData(seq, dmp).c_str());
34-
35-
ByteDynArray smHead;
36-
smHead = apdu.left(4);
24+
init_func
25+
26+
std::string dmp;
27+
- ODS(dumpHexData(seq, dmp).c_str());
28+
+ ODS("%s\n", dumpHexData(seq, dmp).c_str());
29+
30+
increment(seq);
31+
32+
- ODS(dumpHexData(seq, dmp).c_str());
33+
+ ODS("%s\n", dumpHexData(seq, dmp).c_str());
34+
35+
ByteDynArray smHead;
36+
smHead = apdu.left(4);
3737
diff --git a/cie-pkcs11/PCSC/APDU.cpp b/cie-pkcs11/PCSC/APDU.cpp
3838
index e7325d2..3fd89b9 100644
3939
--- a/cie-pkcs11/PCSC/APDU.cpp
4040
+++ b/cie-pkcs11/PCSC/APDU.cpp
4141
@@ -10,23 +10,23 @@
42-
43-
APDU::APDU() {
44-
}
45-
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2,BYTE LC,BYTE *pData,BYTE LE) {
46-
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LC,uint8_t *pData,uint8_t LE) {
47-
init_func
48-
if (LC>250) throw;
49-
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLC=LC;pbtData=pData;btLE=LE;
50-
bLC=true;bLE=true;
51-
exit_func
52-
}
53-
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2,BYTE LC,BYTE *pData) {
54-
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LC,uint8_t *pData) {
55-
if (LC>251) throw;
56-
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLC=LC;pbtData=pData;btLE=0;
57-
bLC=true;bLE=false;
58-
}
59-
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2,BYTE LE) {
60-
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LE) {
61-
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLE=LE;btLC=0;
62-
bLC=false;bLE=true;
63-
}
64-
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2) {
65-
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2) {
66-
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLE=0;btLC=0;
67-
bLC=false;bLE=false;
68-
}
42+
43+
APDU::APDU() {
44+
}
45+
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2,BYTE LC,BYTE *pData,BYTE LE) {
46+
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LC,uint8_t *pData,uint8_t LE) {
47+
init_func
48+
if (LC>250) throw;
49+
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLC=LC;pbtData=pData;btLE=LE;
50+
bLC=true;bLE=true;
51+
exit_func
52+
}
53+
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2,BYTE LC,BYTE *pData) {
54+
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LC,uint8_t *pData) {
55+
if (LC>251) throw;
56+
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLC=LC;pbtData=pData;btLE=0;
57+
bLC=true;bLE=false;
58+
}
59+
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2,BYTE LE) {
60+
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2,uint8_t LE) {
61+
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLE=LE;btLC=0;
62+
bLC=false;bLE=true;
63+
}
64+
-APDU::APDU(BYTE CLA,BYTE INS,BYTE P1,BYTE P2) {
65+
+APDU::APDU(uint8_t CLA,uint8_t INS,uint8_t P1,uint8_t P2) {
66+
btINS=INS;btCLA=CLA;btP1=P1;btP2=P2;btLE=0;btLC=0;
67+
bLC=false;bLE=false;
68+
}
6969
diff --git a/cie-pkcs11/Util/log.cpp b/cie-pkcs11/Util/log.cpp
7070
index 829ad42..5e70b3c 100644
7171
--- a/cie-pkcs11/Util/log.cpp
7272
+++ b/cie-pkcs11/Util/log.cpp
7373
@@ -51,9 +51,7 @@ void initLog(const char *moduleName, const char *iniFile,const char *version)
74-
75-
logGlobalVersion=version;
76-
77-
- OutputDebugString("File INI:");
78-
- OutputDebugString(iniFile);
79-
- OutputDebugString("\n");
80-
+ OutputDebugString("File INI: %s\n", iniFile);
81-
82-
UUCProperties settings;
83-
//settings.load(iniFile);
74+
75+
logGlobalVersion=version;
76+
77+
- OutputDebugString("File INI:");
78+
- OutputDebugString(iniFile);
79+
- OutputDebugString("\n");
80+
+ OutputDebugString("File INI: %s\n", iniFile);
81+
82+
UUCProperties settings;
83+
//settings.load(iniFile);
8484
diff --git a/cie_sign_sdk/src/Crypto/CryptoUtil.h b/cie_sign_sdk/src/Crypto/CryptoUtil.h
8585
index 4c9a795..380f44b 100644
8686
--- a/cie_sign_sdk/src/Crypto/CryptoUtil.h
@@ -126,14 +126,14 @@ index bb4ae56..f984fd0 100644
126126
--- a/cie_sign_sdk/src/UUCLogger.cpp
127127
+++ b/cie_sign_sdk/src/UUCLogger.cpp
128128
@@ -102,7 +102,7 @@ void UUCLogger::log(const unsigned int nType, const char *szMsg, const unsigned
129-
130-
char szLogMsg[5000];
131-
sprintf(szLogMsg, "[%s], %d, %X, %s, %s\n", szTime, nType, nID, szModuleName, szMsg);
132-
- printf(szLogMsg);
133-
+ printf("%s\n", szLogMsg);
134-
if(pfnCrashliticsLog != NULL)
135-
pfnCrashliticsLog(szLogMsg);
136-
129+
130+
char szLogMsg[5000];
131+
sprintf(szLogMsg, "[%s], %d, %X, %s, %s\n", szTime, nType, nID, szModuleName, szMsg);
132+
- printf(szLogMsg);
133+
+ printf("%s\n", szLogMsg);
134+
if(pfnCrashliticsLog != NULL)
135+
pfnCrashliticsLog(szLogMsg);
136+
137137
--
138138
2.43.5
139139

cie-middleware-fix-c++-std-headers.patch

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
From dd9c8b3e67147ab232415eca00e7e2e033e04010 Mon Sep 17 00:00:00 2001
1+
From 8dcea564c9754d9153f73f9f4a80f3da5b4c3ad9 Mon Sep 17 00:00:00 2001
22
From: Luca Magrone <luca@magrone.cc>
33
Date: Mon, 7 Oct 2024 21:45:12 +0200
44
Subject: [PATCH] Add missing cstring and cstdint headers
@@ -18,13 +18,13 @@ index 3584444..3df99b5 100644
1818
--- a/cie-pkcs11/LOGGER/Logger.cpp
1919
+++ b/cie-pkcs11/LOGGER/Logger.cpp
2020
@@ -2,6 +2,7 @@
21-
#include <cstdlib>
22-
#include <ctime>
23-
#include <iomanip>
24-
+#include <cstring>
25-
#include <sys/stat.h>
26-
#include <unistd.h>
27-
#include "Logger.h"
21+
#include <cstdlib>
22+
#include <ctime>
23+
#include <iomanip>
24+
+#include <cstring>
25+
#include <sys/stat.h>
26+
#include <unistd.h>
27+
#include "Logger.h"
2828
diff --git a/cie-pkcs11/LOGGER/Logger.h b/cie-pkcs11/LOGGER/Logger.h
2929
index 5890527..358c30d 100644
3030
--- a/cie-pkcs11/LOGGER/Logger.h
@@ -42,8 +42,8 @@ index 58089f5..9b0a88a 100644
4242
--- a/cie-pkcs11/Util/log.h
4343
+++ b/cie-pkcs11/Util/log.h
4444
@@ -4,6 +4,7 @@
45-
//#include "defines.h"
46-
#include <string>
45+
//#include "defines.h"
46+
#include <string>
4747
#include <wintypes.h>
4848
+#include <cstdint>
4949

0 commit comments

Comments
 (0)