Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
libkleo
Commits
dbaf6eba
Commit
dbaf6eba
authored
Jun 11, 2021
by
Ingo Klöcker
Browse files
Add test for normalized sender address in encrypt-only mode
GnuPG-bug-id: 5283
parent
a98a9de2
Pipeline
#65275
passed with stage
in 7 minutes and 58 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
autotests/keyresolvercoretest.cpp
View file @
dbaf6eba
...
...
@@ -1118,6 +1118,17 @@ private Q_SLOTS:
testKey
(
"sender-smime@example.net"
,
CMS
).
primaryFingerprint
());
}
void
test_sender_is_set__encrypt_only_mode
()
{
KeyResolverCore
resolver
(
/*encrypt=*/
true
,
/*sign=*/
false
);
resolver
.
setRecipients
({
"prefer-openpgp@example.net"
,
"prefer-smime@example.net"
});
resolver
.
setSender
(
QStringLiteral
(
"sender-mixed@example.net"
));
const
auto
result
=
resolver
.
resolve
();
QCOMPARE
(
resolver
.
normalizedSender
(),
QLatin1String
{
"sender-mixed@example.net"
});
}
private:
Key
testKey
(
const
char
*
email
,
Protocol
protocol
=
UnknownProtocol
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment