diff options
author | Katarina Behrens <Katarina.Behrens@cib.de> | 2017-06-20 14:21:06 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2017-06-23 09:13:17 +0200 |
commit | 72f84c1a0efbce8da02cbf6d5947d2ddfd45c533 (patch) | |
tree | da44cf29cc65e9e651723e869a57d7bb1f5b63f1 /xmlsecurity/source/dialogs | |
parent | 7b5fac67fd2441778cb9a6d2f529adc270998144 (diff) |
gpg4libre: Show certificate kind OpenPGP vs. X509 as 1 table column
Shuffled the columns around a little bit
Change-Id: Ib0a979458db680d712737ff997e1c3b4e4564f3f
Reviewed-on: https://gerrit.libreoffice.org/38984
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'xmlsecurity/source/dialogs')
-rw-r--r-- | xmlsecurity/source/dialogs/certificatechooser.cxx | 10 | ||||
-rw-r--r-- | xmlsecurity/source/dialogs/resourcemanager.cxx | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/xmlsecurity/source/dialogs/certificatechooser.cxx b/xmlsecurity/source/dialogs/certificatechooser.cxx index 726b4038aa96..cb9d2db4d4e5 100644 --- a/xmlsecurity/source/dialogs/certificatechooser.cxx +++ b/xmlsecurity/source/dialogs/certificatechooser.cxx @@ -52,10 +52,11 @@ CertificateChooser::CertificateChooser(vcl::Window* _pParent, pSignatures->set_height_request(aControlSize.Height()); m_pCertLB = VclPtr<SvSimpleTable>::Create(*pSignatures); - static long nTabs[] = { 4, 0, 20*nControlWidth/100, 40*nControlWidth/100, 80*nControlWidth/100 }; + static long nTabs[] = { 5, 0, 20*nControlWidth/100, 50*nControlWidth/100, 60*nControlWidth/100, 70*nControlWidth/100 }; m_pCertLB->SetTabs( &nTabs[0] ); m_pCertLB->InsertHeaderEntry(get<FixedText>("issuedto")->GetText() + "\t" + get<FixedText>("issuedby")->GetText() - + "\t" + get<FixedText>("usage")->GetText() + "\t" + get<FixedText>("expiration")->GetText()); + + "\t" + get<FixedText>("type")->GetText() + "\t" + get<FixedText>("expiration")->GetText() + + "\t" + get<FixedText>("usage")->GetText()); m_pCertLB->SetSelectHdl( LINK( this, CertificateChooser, CertificateHighlightHdl ) ); m_pCertLB->SetDoubleClickHdl( LINK( this, CertificateChooser, CertificateSelectHdl ) ); m_pViewBtn->SetClickHdl( LINK( this, CertificateChooser, ViewButtonHdl ) ); @@ -189,8 +190,9 @@ void CertificateChooser::ImplInitialize() mvUserData.push_back(userData); SvTreeListEntry* pEntry = m_pCertLB->InsertEntry( XmlSec::GetContentPart( xCerts[ nC ]->getSubjectName() ) + "\t" + XmlSec::GetContentPart( xCerts[ nC ]->getIssuerName() ) - + "\t" + UsageInClearText( xCerts[ nC ]->getCertificateUsage() ) - + "\t" + XmlSec::GetDateString( xCerts[ nC ]->getNotValidAfter() ) ); + + "\t" + XmlSec::GetCertificateKind( xCerts[ nC ]->getCertificateKind() ) + + "\t" + XmlSec::GetDateString( xCerts[ nC ]->getNotValidAfter() ) + + "\t" + UsageInClearText( xCerts[ nC ]->getCertificateUsage() ) ); pEntry->SetUserData( userData.get() ); } } diff --git a/xmlsecurity/source/dialogs/resourcemanager.cxx b/xmlsecurity/source/dialogs/resourcemanager.cxx index 00911d180cbf..cb8d3e239cd7 100644 --- a/xmlsecurity/source/dialogs/resourcemanager.cxx +++ b/xmlsecurity/source/dialogs/resourcemanager.cxx @@ -67,6 +67,19 @@ namespace XmlSec return GetLocaleData().getDate( GetDateTime( _rDT ) ); } + OUString GetCertificateKind( const css::security::CertificateKind &rKind ) + { + switch (rKind) + { + case css::security::CertificateKind_X509: + return OUString("X.509"); + case css::security::CertificateKind_OPENPGP: + return OUString("OpenPGP"); + default: + return OUString(); + } + } + /* Creates two strings based on the distinguished name which are displayed in the certificate details view. The first string contains only the values of the attribute |