mirror of
https://github.com/chris2511/xca.git
synced 2026-09-13 18:46:25 +05:00
Better support multiple selections - Export all selected items into one PEM file - Batch Revoke/unrevoke/renew of many selected certificates of the same issuer - allow exporting templates as PEM Add Feat. Reg. #83 Option to revoke old certificate when renewing Always put all signed certificate to the newest CA. If a CA certificate is renewed, all certificates issued by the old CA are now shown as signed by the new one.
57 lines
1.3 KiB
C++
57 lines
1.3 KiB
C++
/* vi: set sw=4 ts=4:
|
|
*
|
|
* Copyright (C) 2015 Christian Hohnstaedt.
|
|
*
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#include "lib/pki_x509req.h"
|
|
#include "X509SuperTreeView.h"
|
|
#include "MainWindow.h"
|
|
#include <QtCore/QAbstractItemModel>
|
|
#include <QtGui/QAbstractItemView>
|
|
#include <QtGui/QMenu>
|
|
|
|
void X509SuperTreeView::fillContextMenu(QMenu *menu, QMenu *subExport,
|
|
const QModelIndex &index, QModelIndexList indexes)
|
|
{
|
|
pki_x509super *x = static_cast<pki_x509super *>
|
|
(index.internalPointer());
|
|
transform = NULL;
|
|
|
|
if (indexes.size() != 1)
|
|
return;
|
|
|
|
subExport->addAction(tr("OpenSSL config"), this, SLOT(toOpenssl()));
|
|
subExport->setEnabled(!x->isSpki());
|
|
transform = menu->addMenu(tr("Transform"));
|
|
transform->addAction(tr("Template"), this,
|
|
SLOT(toTemplate()))->setEnabled(!x->isSpki());
|
|
transform->addAction(tr("Public Key"), this,
|
|
SLOT(extractPubkey()))->setEnabled(!x->getRefKey());
|
|
}
|
|
|
|
void X509SuperTreeView::extractPubkey()
|
|
{
|
|
QModelIndex idx = currentIndex();
|
|
|
|
if (idx.isValid() && x509super)
|
|
x509super->extractPubkey(idx);
|
|
}
|
|
|
|
void X509SuperTreeView::toTemplate()
|
|
{
|
|
QModelIndex idx = currentIndex();
|
|
|
|
if (idx.isValid() && x509super)
|
|
x509super->toTemplate(idx);
|
|
}
|
|
|
|
void X509SuperTreeView::toOpenssl()
|
|
{
|
|
QModelIndex idx = currentIndex();
|
|
|
|
if (idx.isValid() && x509super)
|
|
x509super->toOpenssl(idx);
|
|
}
|