Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F35155884
test_keyformailbox.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
869 B
Subscribers
None
test_keyformailbox.cpp
View Options
/*
test_keyformailbox.cpp
This file is part of libkleopatra's test suite.
SPDX-FileCopyrightText: 2016 Bundesamt für Sicherheit in der Informationstechnik
SPDX-FileContributor: Intevation GmbH
SPDX-License-Identifier: GPL-2.0-only
*/
#include
<qgpgme/keyformailboxjob.h>
#include
<qgpgme/protocol.h>
#include
<gpgme++/key.h>
#include
<gpgme++/keylistresult.h>
#include
<QDebug>
int
main
(
int
argc
,
char
**
argv
)
{
QString
mailbox
;
if
(
argc
==
2
)
{
mailbox
=
QString
::
fromLocal8Bit
(
argv
[
1
]);
}
const
auto
proto
=
QGpgME
::
openpgp
();
auto
*
job
=
proto
->
keyForMailboxJob
();
GpgME
::
Key
k
;
GpgME
::
UserID
uid
;
job
->
exec
(
mailbox
,
true
,
k
,
uid
);
qDebug
()
<<
"UID Name: "
<<
uid
.
name
()
<<
" Mail: "
<<
uid
.
email
()
<<
" id: "
<<
uid
.
id
();
qDebug
()
<<
"Key fpr: "
<<
k
.
primaryFingerprint
();
return
0
;
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Mon, Feb 2, 8:08 AM (12 h, 48 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
45/8d/09b67b86037c10998d520d27b85b
Attached To
rLIBKLEO Libkleo
Event Timeline
Log In to Comment