Page Menu
Home
GnuPG
Search
Configure Global Search
Log In
Files
F40366705
pivcardwidget.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Size
1 KB
Subscribers
None
pivcardwidget.h
View Options
/* view/pivcardwiget.h
This file is part of Kleopatra, the KDE keymanager
SPDX-FileCopyrightText: 2020 g10 Code GmbH
SPDX-FileContributor: Ingo Klöcker <dev@ingo-kloecker.de>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include
<smartcard/keypairinfo.h>
#include
<QMap>
#include
<QWidget>
#include
<gpgme++/error.h>
class
QLabel
;
class
QPushButton
;
namespace
Kleo
{
namespace
SmartCard
{
class
PIVCard
;
}
// namespace SmartCard
class
PIVCardWidget
:
public
QWidget
{
Q_OBJECT
public
:
explicit
PIVCardWidget
(
QWidget
*
parent
=
nullptr
);
~
PIVCardWidget
()
override
;
void
setCard
(
const
SmartCard
::
PIVCard
*
card
);
struct
KeyWidgets
{
SmartCard
::
KeyPairInfo
keyInfo
;
std
::
string
certificateData
;
QLabel
*
keyGrip
=
nullptr
;
QLabel
*
keyAlgorithm
=
nullptr
;
QLabel
*
certificateInfo
=
nullptr
;
QPushButton
*
generateButton
=
nullptr
;
QPushButton
*
createCSRButton
=
nullptr
;
QPushButton
*
writeCertificateButton
=
nullptr
;
QPushButton
*
importCertificateButton
=
nullptr
;
QPushButton
*
writeKeyButton
=
nullptr
;
};
private
:
KeyWidgets
createKeyWidgets
(
const
SmartCard
::
KeyPairInfo
&
keyInfo
);
void
updateCachedValues
(
const
std
::
string
&
keyRef
,
const
SmartCard
::
PIVCard
*
card
);
void
updateKeyWidgets
(
const
std
::
string
&
keyRef
);
void
generateKey
(
const
std
::
string
&
keyref
);
void
createCSR
(
const
std
::
string
&
keyref
);
void
writeCertificateToCard
(
const
std
::
string
&
keyref
);
void
importCertificateFromCard
(
const
std
::
string
&
keyref
);
void
writeKeyToCard
(
const
std
::
string
&
keyref
);
void
createKeyFromCardKeys
();
void
changePin
(
const
std
::
string
&
keyRef
);
void
setAdminKey
();
private
:
std
::
string
mCardSerialNumber
;
QLabel
*
mSerialNumber
=
nullptr
;
QLabel
*
mVersionLabel
=
nullptr
;
QPushButton
*
mKeyForCardKeysButton
=
nullptr
;
std
::
map
<
std
::
string
,
KeyWidgets
>
mKeyWidgets
;
};
}
// namespace Kleo
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Tue, Apr 14, 9:23 PM (3 h, 50 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
35/96/ffaefd2ad1639cfea3e34c6ee0ca
Attached To
rKLEOPATRA Kleopatra
Event Timeline
Log In to Comment