aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/core/GpgCoreTestImportExport.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/core/GpgCoreTestImportExport.cpp')
-rw-r--r--src/test/core/GpgCoreTestImportExport.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/test/core/GpgCoreTestImportExport.cpp b/src/test/core/GpgCoreTestImportExport.cpp
index 87e13252..7c8ab22a 100644
--- a/src/test/core/GpgCoreTestImportExport.cpp
+++ b/src/test/core/GpgCoreTestImportExport.cpp
@@ -40,8 +40,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestA) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
- QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
- QCryptographicHash::Sha256)
+ QCryptographicHash::hash(
+ gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
+ QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));
@@ -54,8 +55,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestB) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
- QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
- QCryptographicHash::Sha256)
+ QCryptographicHash::hash(
+ gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
+ QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));
@@ -68,8 +70,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestC) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
- QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
- QCryptographicHash::Sha256)
+ QCryptographicHash::hash(
+ gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
+ QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));
@@ -82,8 +85,9 @@ TEST_F(GpgCoreTest, CoreExportSubkeyTestD) {
ASSERT_EQ(CheckGpgError(err), GPG_ERR_NO_ERROR);
ASSERT_FALSE(gf_buffer.Empty());
ASSERT_EQ(
- QCryptographicHash::hash(gf_buffer.ConvertToQByteArray(),
- QCryptographicHash::Sha256)
+ QCryptographicHash::hash(
+ gf_buffer.ConvertToQByteArray().replace("\r\n", "\n"),
+ QCryptographicHash::Sha256)
.toHex(),
QByteArray(
"6e3375060aa889d9eb61e2966eabb31eb6b5359a7742ee7adeedec09e6afa36a"));