File: 0002-Fix-typo-in-outputIsBase64Encoded.patch

package info (click to toggle)
qgpgme 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,164 kB
  • sloc: cpp: 15,880; sh: 157; makefile: 10
file content (209 lines) | stat: -rw-r--r-- 10,097 bytes parent folder | download
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
From dcec6832e81b7b972cf7fd85dc7c2efd5464908e Mon Sep 17 00:00:00 2001
From: Carl Schwan <carl.schwan@gnupg.com>
Date: Fri, 13 Jun 2025 10:01:07 +0200
Subject: [PATCH 2/4] Fix typo in outputIsBase64Encoded

--
* src/{qgpgmesignjob.cpp,qgpgmesignencryptjob.cpp,qgpgmeencryptjob.cpp}:
  Replace bsse with base in outputIsBase64Encoded
---
 src/qgpgmeencryptjob.cpp     | 10 +++++-----
 src/qgpgmesignencryptjob.cpp | 10 +++++-----
 src/qgpgmesignjob.cpp        | 10 +++++-----
 3 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/qgpgmeencryptjob.cpp b/src/qgpgmeencryptjob.cpp
index 7e15eea..041edda 100644
--- a/src/qgpgmeencryptjob.cpp
+++ b/src/qgpgmeencryptjob.cpp
@@ -97,11 +97,11 @@ void QGpgMEEncryptJob::setOutputIsBase64Encoded(bool on)
 static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread,
         const std::vector<Key> &recipients,
         const std::weak_ptr<QIODevice> &plainText_,
         const std::weak_ptr<QIODevice> &cipherText_,
         const Context::EncryptionFlags eflags,
-        bool outputIsBsse64Encoded,
+        bool outputIsBase64Encoded,
         Data::Encoding inputEncoding,
         const QString &fileName)
 {
 
     const std::shared_ptr<QIODevice> plainText = plainText_.lock();
@@ -125,11 +125,11 @@ static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread,
 
     if (!cipherText) {
         QGpgME::QByteArrayDataProvider out;
         Data outdata(&out);
 
-        if (outputIsBsse64Encoded) {
+        if (outputIsBase64Encoded) {
             outdata.setEncoding(Data::Base64Encoding);
         }
 
         const EncryptionResult res = ctx->encrypt(recipients, indata, outdata, eflags);
         Error ae;
@@ -137,11 +137,11 @@ static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread,
         return std::make_tuple(res, out.data(), log, ae);
     } else {
         QGpgME::QIODeviceDataProvider out(cipherText);
         Data outdata(&out);
 
-        if (outputIsBsse64Encoded) {
+        if (outputIsBase64Encoded) {
             outdata.setEncoding(Data::Base64Encoding);
         }
 
         const EncryptionResult res = ctx->encrypt(recipients, indata, outdata, eflags);
         Error ae;
@@ -149,18 +149,18 @@ static QGpgMEEncryptJob::result_type encrypt(Context *ctx, QThread *thread,
         return std::make_tuple(res, QByteArray(), log, ae);
     }
 
 }
 
-static QGpgMEEncryptJob::result_type encrypt_qba(Context *ctx, const std::vector<Key> &recipients, const QByteArray &plainText, const Context::EncryptionFlags eflags, bool outputIsBsse64Encoded, Data::Encoding inputEncoding, const QString &fileName)
+static QGpgMEEncryptJob::result_type encrypt_qba(Context *ctx, const std::vector<Key> &recipients, const QByteArray &plainText, const Context::EncryptionFlags eflags, bool outputIsBase64Encoded, Data::Encoding inputEncoding, const QString &fileName)
 {
     const std::shared_ptr<QBuffer> buffer(new QBuffer);
     buffer->setData(plainText);
     if (!buffer->open(QIODevice::ReadOnly)) {
         assert(!"This should never happen: QBuffer::open() failed");
     }
-    return encrypt(ctx, nullptr, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBsse64Encoded, inputEncoding, fileName);
+    return encrypt(ctx, nullptr, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBase64Encoded, inputEncoding, fileName);
 }
 
 static QGpgMEEncryptJob::result_type encrypt_to_filename(Context *ctx,
                                                          const std::vector<Key> &recipients,
                                                          const QString &inputFilePath,
diff --git a/src/qgpgmesignencryptjob.cpp b/src/qgpgmesignencryptjob.cpp
index 769a078..65159f0 100644
--- a/src/qgpgmesignencryptjob.cpp
+++ b/src/qgpgmesignencryptjob.cpp
@@ -95,11 +95,11 @@ void QGpgMESignEncryptJob::setOutputIsBase64Encoded(bool on)
     mOutputIsBase64Encoded = on;
 }
 
 static QGpgMESignEncryptJob::result_type sign_encrypt(Context *ctx, QThread *thread, const std::vector<Key> &signers,
                                                       const std::vector<Key> &recipients, const std::weak_ptr<QIODevice> &plainText_,
-                                                      const std::weak_ptr<QIODevice> &cipherText_, const Context::EncryptionFlags eflags, bool outputIsBsse64Encoded, const QString &fileName)
+                                                      const std::weak_ptr<QIODevice> &cipherText_, const Context::EncryptionFlags eflags, bool outputIsBase64Encoded, const QString &fileName)
 {
     const std::shared_ptr<QIODevice> &plainText = plainText_.lock();
     const std::shared_ptr<QIODevice> &cipherText = cipherText_.lock();
 
     const _detail::ToThreadMover ctMover(cipherText, thread);
@@ -127,11 +127,11 @@ static QGpgMESignEncryptJob::result_type sign_encrypt(Context *ctx, QThread *thr
 
     if (!cipherText) {
         QGpgME::QByteArrayDataProvider out;
         Data outdata(&out);
 
-        if (outputIsBsse64Encoded) {
+        if (outputIsBase64Encoded) {
             outdata.setEncoding(Data::Base64Encoding);
         }
 
         const std::pair<SigningResult, EncryptionResult> res = ctx->signAndEncrypt(recipients, indata, outdata, eflags);
         Error ae;
@@ -139,11 +139,11 @@ static QGpgMESignEncryptJob::result_type sign_encrypt(Context *ctx, QThread *thr
         return std::make_tuple(res.first, res.second, out.data(), log, ae);
     } else {
         QGpgME::QIODeviceDataProvider out(cipherText);
         Data outdata(&out);
 
-        if (outputIsBsse64Encoded) {
+        if (outputIsBase64Encoded) {
             outdata.setEncoding(Data::Base64Encoding);
         }
 
         const std::pair<SigningResult, EncryptionResult> res = ctx->signAndEncrypt(recipients, indata, outdata, eflags);
         Error ae;
@@ -152,18 +152,18 @@ static QGpgMESignEncryptJob::result_type sign_encrypt(Context *ctx, QThread *thr
     }
 
 }
 
 static QGpgMESignEncryptJob::result_type sign_encrypt_qba(Context *ctx, const std::vector<Key> &signers,
-                                                          const std::vector<Key> &recipients, const QByteArray &plainText, const Context::EncryptionFlags eflags, bool outputIsBsse64Encoded, const QString &fileName)
+                                                          const std::vector<Key> &recipients, const QByteArray &plainText, const Context::EncryptionFlags eflags, bool outputIsBase64Encoded, const QString &fileName)
 {
     const std::shared_ptr<QBuffer> buffer(new QBuffer);
     buffer->setData(plainText);
     if (!buffer->open(QIODevice::ReadOnly)) {
         assert(!"This should never happen: QBuffer::open() failed");
     }
-    return sign_encrypt(ctx, nullptr, signers, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBsse64Encoded, fileName);
+    return sign_encrypt(ctx, nullptr, signers, recipients, buffer, std::shared_ptr<QIODevice>(), eflags, outputIsBase64Encoded, fileName);
 }
 
 static QGpgMESignEncryptJob::result_type sign_encrypt_to_filename(Context *ctx,
                                                                   const std::vector<Key> &signers,
                                                                   const std::vector<Key> &recipients,
diff --git a/src/qgpgmesignjob.cpp b/src/qgpgmesignjob.cpp
index f94044b..29ff35f 100644
--- a/src/qgpgmesignjob.cpp
+++ b/src/qgpgmesignjob.cpp
@@ -95,11 +95,11 @@ void QGpgMESignJob::setOutputIsBase64Encoded(bool on)
 static QGpgMESignJob::result_type sign(Context *ctx, QThread *thread,
                                        const std::vector<Key> &signers,
                                        const std::weak_ptr<QIODevice> &plainText_,
                                        const std::weak_ptr<QIODevice> &signature_,
                                        SignatureMode mode,
-                                       bool outputIsBsse64Encoded)
+                                       bool outputIsBase64Encoded)
 {
 
     const std::shared_ptr<QIODevice> plainText = plainText_.lock();
     const std::shared_ptr<QIODevice> signature = signature_.lock();
 
@@ -123,11 +123,11 @@ static QGpgMESignJob::result_type sign(Context *ctx, QThread *thread,
 
     if (!signature) {
         QGpgME::QByteArrayDataProvider out;
         Data outdata(&out);
 
-        if (outputIsBsse64Encoded) {
+        if (outputIsBase64Encoded) {
             outdata.setEncoding(Data::Base64Encoding);
         }
 
         const SigningResult res = ctx->sign(indata, outdata, mode);
         Error ae;
@@ -135,11 +135,11 @@ static QGpgMESignJob::result_type sign(Context *ctx, QThread *thread,
         return std::make_tuple(res, out.data(), log, ae);
     } else {
         QGpgME::QIODeviceDataProvider out(signature);
         Data outdata(&out);
 
-        if (outputIsBsse64Encoded) {
+        if (outputIsBase64Encoded) {
             outdata.setEncoding(Data::Base64Encoding);
         }
 
         const SigningResult res = ctx->sign(indata, outdata, mode);
         Error ae;
@@ -151,18 +151,18 @@ static QGpgMESignJob::result_type sign(Context *ctx, QThread *thread,
 
 static QGpgMESignJob::result_type sign_qba(Context *ctx,
         const std::vector<Key> &signers,
         const QByteArray &plainText,
         SignatureMode mode,
-        bool outputIsBsse64Encoded)
+        bool outputIsBase64Encoded)
 {
     const std::shared_ptr<QBuffer> buffer(new QBuffer);
     buffer->setData(plainText);
     if (!buffer->open(QIODevice::ReadOnly)) {
         assert(!"This should never happen: QBuffer::open() failed");
     }
-    return sign(ctx, nullptr, signers, buffer, std::shared_ptr<QIODevice>(), mode, outputIsBsse64Encoded);
+    return sign(ctx, nullptr, signers, buffer, std::shared_ptr<QIODevice>(), mode, outputIsBase64Encoded);
 }
 
 static QGpgMESignJob::result_type sign_to_filename(Context *ctx,
                                                    const std::vector<Key> &signers,
                                                    const QString &inputFilePath,
-- 
2.51.0