mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-03 13:43:03 -04:00
Plugged-in method for removing signatures in PGP keys => now RS has small and constant-sized certificates.
- added checkbox in ConfCertDialog to allow adding/removing signatures - enabled again key signature button in friend wizard - RS cert links now use small keys. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4836 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
fadc86b189
commit
a8456a2332
5 changed files with 48 additions and 15 deletions
|
@ -33,6 +33,7 @@
|
||||||
#include "pqi/pqinotify.h"
|
#include "pqi/pqinotify.h"
|
||||||
|
|
||||||
#include <util/rsdir.h>
|
#include <util/rsdir.h>
|
||||||
|
#include <util/pgpkey.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -1437,6 +1438,13 @@ std::string AuthGPGimpl::SaveCertificateToString(const std::string &id,bool incl
|
||||||
|
|
||||||
gpgme_free(export_txt);
|
gpgme_free(export_txt);
|
||||||
|
|
||||||
|
// Try to remove signatures manually.
|
||||||
|
//
|
||||||
|
std::string cleaned_key ;
|
||||||
|
|
||||||
|
if( (!include_signatures) && PGPKeyManagement::createMinimalKey(tmp,cleaned_key))
|
||||||
|
return cleaned_key ;
|
||||||
|
else
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ ConfCertDialog::ConfCertDialog(const std::string& id, QWidget *parent, Qt::WFlag
|
||||||
connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
|
connect(ui.denyFriendButton, SIGNAL(clicked()), this, SLOT(denyFriend()));
|
||||||
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
|
connect(ui.signKeyButton, SIGNAL(clicked()), this, SLOT(signGPGKey()));
|
||||||
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
|
connect(ui.trusthelpButton, SIGNAL(clicked()), this, SLOT(showHelpDialog()));
|
||||||
|
connect(ui._shouldAddSignatures_CB, SIGNAL(toggled(bool)), this, SLOT(loadInvitePage()));
|
||||||
|
|
||||||
#ifndef MINIMAL_RSGUI
|
#ifndef MINIMAL_RSGUI
|
||||||
MainWindow *w = MainWindow::getInstance();
|
MainWindow *w = MainWindow::getInstance();
|
||||||
|
@ -322,7 +323,23 @@ void ConfCertDialog::load()
|
||||||
}
|
}
|
||||||
ui.signers->setHtml(text);
|
ui.signers->setHtml(text);
|
||||||
|
|
||||||
std::string invite = rsPeers->GetRetroshareInvite(detail.id,true) ; // this needs to be a SSL id
|
loadInvitePage() ;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ConfCertDialog::loadInvitePage()
|
||||||
|
{
|
||||||
|
RsPeerDetails detail;
|
||||||
|
if (!rsPeers->getPeerDetails(mId, detail))
|
||||||
|
{
|
||||||
|
QMessageBox::information(this,
|
||||||
|
tr("RetroShare"),
|
||||||
|
tr("Error : cannot get peer details."));
|
||||||
|
close();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
std::string invite = rsPeers->GetRetroshareInvite(detail.id,ui._shouldAddSignatures_CB->isChecked()) ; // this needs to be a SSL id
|
||||||
|
|
||||||
ui.userCertificateText->setReadOnly(true);
|
ui.userCertificateText->setReadOnly(true);
|
||||||
ui.userCertificateText->setMinimumHeight(200);
|
ui.userCertificateText->setMinimumHeight(200);
|
||||||
|
|
|
@ -55,6 +55,7 @@ private slots:
|
||||||
void makeFriend();
|
void makeFriend();
|
||||||
void denyFriend();
|
void denyFriend();
|
||||||
void signGPGKey();
|
void signGPGKey();
|
||||||
|
void loadInvitePage();
|
||||||
|
|
||||||
void showHelpDialog();
|
void showHelpDialog();
|
||||||
/** Called when a child window requests the given help <b>topic</b>. */
|
/** Called when a child window requests the given help <b>topic</b>. */
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>469</width>
|
<width>516</width>
|
||||||
<height>528</height>
|
<height>623</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QTabWidget" name="stabWidget">
|
<widget class="QTabWidget" name="stabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="icon">
|
<attribute name="icon">
|
||||||
|
@ -701,10 +701,17 @@ p, li { white-space: pre-wrap; }
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>Certificate</string>
|
<string>Certificate</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="userCertificateText"/>
|
<widget class="QTextEdit" name="userCertificateText"/>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="_shouldAddSignatures_CB">
|
||||||
|
<property name="text">
|
||||||
|
<string>Include signatures</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
@ -320,7 +320,7 @@ TextPage::TextPage(QWidget *parent)
|
||||||
userCertButtonsLayout = new QVBoxLayout();
|
userCertButtonsLayout = new QVBoxLayout();
|
||||||
userCertButtonsLayout->addWidget(userCertHelpButton);
|
userCertButtonsLayout->addWidget(userCertHelpButton);
|
||||||
|
|
||||||
if(rsPeers->hasExportMinimal())
|
// if(rsPeers->hasExportMinimal())
|
||||||
userCertButtonsLayout->addWidget(userCertIncludeSignaturesButton);
|
userCertButtonsLayout->addWidget(userCertIncludeSignaturesButton);
|
||||||
|
|
||||||
userCertButtonsLayout->addWidget(userCertCopyButton);
|
userCertButtonsLayout->addWidget(userCertCopyButton);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue