• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

kleopatra

  • sources
  • kde-4.12
  • kdepim
  • kleopatra
  • utils
formatting.cpp
Go to the documentation of this file.
1 /* -*- mode: c++; c-basic-offset:4 -*-
2  utils/formatting.cpp
3 
4  This file is part of Kleopatra, the KDE keymanager
5  Copyright (c) 2007 Klarälvdalens Datakonsult AB
6 
7  Kleopatra is free software; you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation; either version 2 of the License, or
10  (at your option) any later version.
11 
12  Kleopatra is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #include <config-kleopatra.h>
34 
35 #include "formatting.h"
36 
37 #include <utils/kleo_assert.h>
38 
39 #include <kleo/dn.h>
40 
41 #include <kmime/kmime_header_parsing.h>
42 
43 #include <gpgme++/key.h>
44 #include <gpgme++/importresult.h>
45 
46 #include <KLocale>
47 #include <KGlobal>
48 
49 #include <QString>
50 #include <QStringList>
51 #include <QDateTime>
52 #include <QCoreApplication>
53 #include <QTextDocument> // for Qt::escape
54 
55 using namespace GpgME;
56 using namespace Kleo;
57 using namespace KMime::Types;
58 using namespace KMime::HeaderParsing;
59 
60 //
61 // Name
62 //
63 
64 QString Formatting::prettyName( int proto, const char * id, const char * name_, const char * comment_ ) {
65 
66  if ( proto == OpenPGP ) {
67  const QString name = QString::fromUtf8( name_ );
68  if ( name.isEmpty() )
69  return QString();
70  const QString comment = QString::fromUtf8( comment_ );
71  if ( comment.isEmpty() )
72  return name;
73  return QString::fromLatin1( "%1 (%2)" ).arg( name, comment );
74  }
75 
76  if ( proto == CMS ) {
77  const DN subject( id );
78  const QString cn = subject[QLatin1String("CN")].trimmed();
79  if ( cn.isEmpty() )
80  return subject.prettyDN();
81  return cn;
82  }
83 
84  return QString();
85 }
86 
87 QString Formatting::prettyNameAndEMail( int proto, const char * id, const char * name_, const char * email_, const char * comment_ ) {
88  return prettyNameAndEMail( proto, QString::fromUtf8( id ), QString::fromUtf8( name_ ), prettyEMail( email_, id ), QString::fromUtf8( comment_ ) );
89 }
90 
91 QString Formatting::prettyNameAndEMail( int proto, const QString & id, const QString & name, const QString & email, const QString & comment ) {
92 
93  if ( proto == OpenPGP ) {
94  if ( name.isEmpty() ) {
95  if ( email.isEmpty() )
96  return QString();
97  else if ( comment.isEmpty() )
98  return QString::fromLatin1( "<%1>" ).arg( email );
99  else
100  return QString::fromLatin1( "(%2) <%1>" ).arg( email, comment );
101  }
102  if ( email.isEmpty() ) {
103  if ( comment.isEmpty() )
104  return name;
105  else
106  return QString::fromLatin1( "%1 (%2)" ).arg( name, comment );
107  }
108  if ( comment.isEmpty() )
109  return QString::fromLatin1( "%1 <%2>" ).arg( name, email );
110  else
111  return QString::fromLatin1( "%1 (%3) <%2>" ).arg( name, email, comment );
112  }
113 
114  if ( proto == CMS ) {
115  const DN subject( id );
116  const QString cn = subject[QLatin1String("CN")].trimmed();
117  if ( cn.isEmpty() )
118  return subject.prettyDN();
119  return cn;
120  }
121  return QString();
122 }
123 
124 QString Formatting::prettyUserID( const UserID & uid ) {
125  if ( uid.parent().protocol() == OpenPGP )
126  return prettyNameAndEMail( uid );
127  const QByteArray id = QByteArray( uid.id() ).trimmed();
128  if ( id.startsWith( '<' ) )
129  return prettyEMail( uid.email(), uid.id() );
130  if ( id.startsWith( '(' ) )
131  // ### parse uri/dns:
132  return QString::fromUtf8( uid.id() );
133  else
134  return DN( uid.id() ).prettyDN();
135 }
136 
137 QString Formatting::prettyKeyID( const char * id ) {
138  if ( !id )
139  return QString();
140  return QLatin1String("0x") + QString::fromLatin1( id ).toUpper();
141 }
142 
143 QString Formatting::prettyNameAndEMail( const UserID & uid ) {
144  return prettyNameAndEMail( uid.parent().protocol(), uid.id(), uid.name(), uid.email(), uid.comment() );
145 }
146 
147 QString Formatting::prettyNameAndEMail( const Key & key ) {
148  return prettyNameAndEMail( key.userID( 0 ) );
149 }
150 
151 QString Formatting::prettyName( const Key & key ) {
152  return prettyName( key.userID( 0 ) );
153 }
154 
155 QString Formatting::prettyName( const UserID & uid ) {
156  return prettyName( uid.parent().protocol(), uid.id(), uid.name(), uid.comment() );
157 }
158 
159 QString Formatting::prettyName( const UserID::Signature & sig ) {
160  return prettyName( OpenPGP, sig.signerUserID(), sig.signerName(), sig.signerComment() );
161 }
162 
163 //
164 // EMail
165 //
166 
167 QString Formatting::prettyEMail( const Key & key ) {
168  for ( unsigned int i = 0, end = key.numUserIDs() ; i < end ; ++i ) {
169  const QString email = prettyEMail( key.userID( i ) );
170  if ( !email.isEmpty() )
171  return email;
172  }
173  return QString();
174 }
175 
176 QString Formatting::prettyEMail( const UserID & uid ) {
177  return prettyEMail( uid.email(), uid.id() );
178 }
179 
180 QString Formatting::prettyEMail( const UserID::Signature & sig ) {
181  return prettyEMail( sig.signerEmail(), sig.signerUserID() );
182 }
183 
184 QString Formatting::prettyEMail( const char * email_, const char * id ) {
185  Mailbox mailBox;
186  if ( email_ && parseMailbox( email_, email_ + strlen( email_ ), mailBox ) )
187  return mailBox.addrSpec().asPrettyString();
188  else
189  return DN( id )[QLatin1String("EMAIL")].trimmed();
190 }
191 
192 //
193 // Tooltip
194 //
195 
196 namespace {
197 
198  static QString protect_whitespace( QString s ) {
199  static const QLatin1Char SP( ' ' ), NBSP( '\xA0' );
200  return s.replace( SP, NBSP );
201  }
202 
203  template <typename T_arg>
204  QString format_row( const QString & field, const T_arg & arg ) {
205  return i18n( "<tr><th>%1:</th><td>%2</td></tr>", protect_whitespace( field ), arg );
206  }
207  QString format_row( const QString & field, const QString & arg ) {
208  return i18n( "<tr><th>%1:</th><td>%2</td></tr>", protect_whitespace( field ), Qt::escape( arg ) );
209  }
210  QString format_row( const QString & field, const char * arg ) {
211  return format_row( field, QString::fromUtf8( arg ) );
212  }
213 
214  QString format_keytype( const Key & key ) {
215  const Subkey subkey = key.subkey( 0 );
216  if ( key.hasSecret() )
217  return i18n( "%1-bit %2 (secret key available)", subkey.length(), QLatin1String(subkey.publicKeyAlgorithmAsString()) );
218  else
219  return i18n( "%1-bit %2", subkey.length(), QLatin1String(subkey.publicKeyAlgorithmAsString()) );
220  }
221 
222  QString format_keyusage( const Key & key ) {
223  QStringList capabilities;
224  if ( key.canReallySign() ) {
225  if ( key.isQualified() )
226  capabilities.push_back( i18n( "Signing EMails and Files (Qualified)" ) );
227  else
228  capabilities.push_back( i18n( "Signing EMails and Files" ) );
229  }
230  if ( key.canEncrypt() )
231  capabilities.push_back( i18n( "Encrypting EMails and Files" ) );
232  if ( key.canCertify() )
233  capabilities.push_back( i18n( "Certifying other Certificates" ) );
234  if ( key.canAuthenticate() )
235  capabilities.push_back( i18n( "Authenticate against Servers" ) );
236  return capabilities.join( QLatin1String(", ") );
237  }
238 
239  static QString time_t2string( time_t t ) {
240  QDateTime dt;
241  dt.setTime_t( t );
242  return KGlobal::locale()->formatDateTime( dt, KLocale::ShortDate );
243  }
244 
245  static QString make_red( const QString & txt ) {
246  return QLatin1String( "<font color=\"red\">" ) + Qt::escape( txt ) + QLatin1String( "</font>" );
247  }
248 
249 }
250 
251 QString Formatting::toolTip( const Key & key, int flags ) {
252  if ( flags == 0 || ( key.protocol() != CMS && key.protocol() != OpenPGP ) )
253  return QString();
254 
255  const Subkey subkey = key.subkey( 0 );
256 
257  QString result;
258  if ( flags & Validity )
259  if ( key.protocol() == OpenPGP || ( key.keyListMode() & Validate ) )
260  if ( key.isRevoked() )
261  result += make_red( i18n( "This certificate has been revoked." ) );
262  else if ( key.isExpired() )
263  result += make_red( i18n( "This certificate has expired." ) );
264  else if ( key.isDisabled() )
265  result += i18n( "This certificate has been disabled locally." );
266  else
267  result += i18n( "This certificate is currently valid." );
268  else
269  result += i18n( "The validity of this certificate cannot be checked at the moment." );
270  if ( flags == Validity )
271  return result;
272 
273  result += QLatin1String( "<table border=\"0\">" );
274  if ( key.protocol() == CMS ) {
275  if ( flags & SerialNumber )
276  result += format_row( i18n("Serial number"), key.issuerSerial() );
277  if ( flags & Issuer )
278  result += format_row( i18n("Issuer"), key.issuerName() );
279  }
280  if ( flags & UserIDs ) {
281  const std::vector<UserID> uids = key.userIDs();
282  if ( !uids.empty() )
283  result += format_row( key.protocol() == CMS
284  ? i18n("Subject")
285  : i18n("User-ID"), prettyUserID( uids.front() ) );
286  if ( uids.size() > 1 )
287  for ( std::vector<UserID>::const_iterator it = uids.begin() + 1, end = uids.end() ; it != end ; ++it )
288  if ( !it->isRevoked() && !it->isInvalid() )
289  result += format_row( i18n("a.k.a."), prettyUserID( *it ) );
290  }
291  if ( flags & ExpiryDates )
292  result += format_row( i18n("Validity"),
293  subkey.neverExpires()
294  ? i18n( "from %1 until forever", time_t2string( subkey.creationTime() ) )
295  : i18n( "from %1 through %2", time_t2string( subkey.creationTime() ), time_t2string( subkey.expirationTime() ) ) );
296  if ( flags & CertificateType )
297  result += format_row( i18n("Certificate type"), format_keytype( key ) );
298  if ( flags & CertificateUsage )
299  result += format_row( i18n("Certificate usage"), format_keyusage( key ) );
300  if ( flags & KeyID )
301  result += format_row( i18n("Key-ID"), QString::fromLatin1( key.shortKeyID() ) ) ;
302  if ( flags & Fingerprint )
303  result += format_row( i18n("Fingerprint"), key.primaryFingerprint() );
304  if ( flags & OwnerTrust )
305  if ( key.protocol() == OpenPGP )
306  result += format_row( i18n("Ownertrust"), ownerTrustShort( key ) );
307  else if ( key.isRoot() )
308  result += format_row( i18n("Trusted issuer?"),
309  key.userID(0).validity() == UserID::Ultimate ? i18n("Yes") :
310  /* else */ i18n("No") );
311  if ( flags & StorageLocation )
312  if ( const char * card = subkey.cardSerialNumber() )
313  result += format_row( i18n("Stored"), i18nc("stored...","on SmartCard with serial no. %1", QString::fromUtf8( card ) ) );
314  else
315  result += format_row( i18n("Stored"), i18nc("stored...","on this computer") );
316  result += QLatin1String( "</table>" );
317 
318  return result;
319 }
320 
321 //
322 // Creation and Expiration
323 //
324 
325 namespace {
326  static QDate time_t2date( time_t t ) {
327  if ( !t )
328  return QDate();
329  QDateTime dt;
330  dt.setTime_t( t );
331  return dt.date();
332  }
333  static QString date2string( const QDate & date ) {
334  return KGlobal::locale()->formatDate( date, KLocale::ShortDate );
335  }
336 
337  template <typename T>
338  QString expiration_date_string( const T & tee ) {
339  return tee.neverExpires() ? QString() : date2string( time_t2date( tee.expirationTime() ) ) ;
340  }
341  template <typename T>
342  QDate creation_date( const T & tee ) {
343  return time_t2date( tee.creationTime() );
344  }
345  template <typename T>
346  QDate expiration_date( const T & tee ) {
347  return time_t2date( tee.expirationTime() );
348  }
349 }
350 
351 QString Formatting::expirationDateString( const Key & key ) {
352  return expiration_date_string( key.subkey( 0 ) );
353 }
354 
355 QString Formatting::expirationDateString( const Subkey & subkey ) {
356  return expiration_date_string( subkey );
357 }
358 
359 QString Formatting::expirationDateString( const UserID::Signature & sig ) {
360  return expiration_date_string( sig );
361 }
362 
363 QDate Formatting::expirationDate( const Key & key ) {
364  return expiration_date( key.subkey( 0 ) );
365 }
366 
367 QDate Formatting::expirationDate( const Subkey & subkey ) {
368  return expiration_date( subkey );
369 }
370 
371 QDate Formatting::expirationDate( const UserID::Signature & sig ) {
372  return expiration_date( sig );
373 }
374 
375 
376 QString Formatting::creationDateString( const Key & key ) {
377  return date2string( creation_date( key.subkey( 0 ) ) );
378 }
379 
380 QString Formatting::creationDateString( const Subkey & subkey ) {
381  return date2string( creation_date( subkey ) );
382 }
383 
384 QString Formatting::creationDateString( const UserID::Signature & sig ) {
385  return date2string( creation_date( sig ) );
386 }
387 
388 QDate Formatting::creationDate( const Key & key ) {
389  return creation_date( key.subkey( 0 ) );
390 }
391 
392 QDate Formatting::creationDate( const Subkey & subkey ) {
393  return creation_date( subkey );
394 }
395 
396 QDate Formatting::creationDate( const UserID::Signature & sig ) {
397  return creation_date( sig );
398 }
399 
400 //
401 // Types
402 //
403 
404 QString Formatting::displayName( Protocol p ) {
405  if ( p == CMS )
406  return i18nc("X.509/CMS encryption standard", "X.509");
407  if ( p == OpenPGP )
408  return i18n("OpenPGP");
409  return i18nc("Unknown encryption protocol", "Unknown");
410 }
411 
412 QString Formatting::type( const Key & key ) {
413  return displayName( key.protocol() );
414 }
415 
416 QString Formatting::type( const Subkey & subkey ) {
417  return QString::fromUtf8( subkey.publicKeyAlgorithmAsString() );
418 }
419 
420 //
421 // Status / Validity
422 //
423 
424 QString Formatting::ownerTrustShort( const Key & key ) {
425  return ownerTrustShort( key.ownerTrust() );
426 }
427 
428 QString Formatting::ownerTrustShort( Key::OwnerTrust trust ) {
429  switch ( trust ) {
430  case Key::Unknown: return i18nc("unknown trust level", "unknown");
431  case Key::Never: return i18n("untrusted");
432  case Key::Marginal: return i18nc("marginal trust", "marginal");
433  case Key::Full: return i18nc("full trust", "full");
434  case Key::Ultimate: return i18nc("ultimate trust", "ultimate");
435  case Key::Undefined: return i18nc("undefined trust", "undefined");
436  default:
437  assert( !"unexpected owner trust value" );
438  break;
439  }
440  return QString();
441 }
442 
443 QString Formatting::validityShort( const Subkey & subkey ) {
444  if ( subkey.isRevoked() )
445  return i18n("revoked");
446  if ( subkey.isExpired() )
447  return i18n("expired");
448  if ( subkey.isDisabled() )
449  return i18n("disabled");
450  if ( subkey.isInvalid() )
451  return i18n("invalid");
452  return i18nc("as in good/valid signature", "good");
453 }
454 
455 QString Formatting::validityShort( const UserID & uid ) {
456  if ( uid.isRevoked() )
457  return i18n("revoked");
458  if ( uid.isInvalid() )
459  return i18n("invalid");
460  switch ( uid.validity() ) {
461  case UserID::Unknown: return i18nc("unknown trust level", "unknown");
462  case UserID::Undefined: return i18nc("undefined trust", "undefined");
463  case UserID::Never: return i18n("untrusted");
464  case UserID::Marginal: return i18nc("marginal trust", "marginal");
465  case UserID::Full: return i18nc("full trust", "full");
466  case UserID::Ultimate: return i18nc("ultimate trust", "ultimate");
467  }
468  return QString();
469 }
470 
471 QString Formatting::validityShort( const UserID::Signature & sig ) {
472  switch ( sig.status() ) {
473  case UserID::Signature::NoError:
474  if ( !sig.isInvalid() ) {
475  if ( sig.certClass() > 0 )
476  return i18n("class %1", sig.certClass() );
477  else
478  return i18nc("good/valid signature", "good");
479  }
480  // fall through:
481  case UserID::Signature::GeneralError:
482  return i18n("invalid");
483  case UserID::Signature::SigExpired: return i18n("expired");
484  case UserID::Signature::KeyExpired: return i18n("certificate expired");
485  case UserID::Signature::BadSignature: return i18nc("fake/invalid signature", "bad");
486  case UserID::Signature::NoPublicKey: return QString();
487  }
488  return QString();
489 }
490 
491 QString Formatting::formatKeyLink( const Key & key ) {
492  if ( key.isNull() )
493  return QString();
494  return QString::fromLatin1( "<a href=\"key:%1\">%2</a>" ).arg( QLatin1String(key.primaryFingerprint()), Formatting::prettyName( key ) );
495 }
496 
497 QString Formatting::formatForComboBox( const GpgME::Key & key ) {
498  const QString name = prettyName( key );
499  QString mail = prettyEMail( key );
500  if ( !mail.isEmpty() )
501  mail = QLatin1Char('<') + mail + QLatin1Char('>');
502  return i18nc( "name, email, key id", "%1 %2 (%3)", name, mail, QLatin1String(key.shortKeyID()) ).simplified();
503 }
504 
505 namespace {
506 
507 static QString keyToString( const Key & key ) {
508 
509  kleo_assert( !key.isNull() );
510 
511  const QString email = Formatting::prettyEMail( key );
512  const QString name = Formatting::prettyName( key );
513 
514  if ( name.isEmpty() )
515  return email;
516  else if ( email.isEmpty() )
517  return name;
518  else
519  return QString::fromLatin1( "%1 <%2>" ).arg( name, email );
520 }
521 
522 }
523 
524 const char * Formatting::summaryToString( const Signature::Summary summary )
525 {
526  if ( summary & Signature::Red )
527  return "RED";
528  if ( summary & Signature::Green )
529  return "GREEN";
530  return "YELLOW";
531 }
532 
533 QString Formatting::signatureToString( const Signature & sig, const Key & key )
534 {
535  if ( sig.isNull() )
536  return QString();
537 
538  const bool red = (sig.summary() & Signature::Red);
539  const bool valid = (sig.summary() & Signature::Valid);
540 
541  if ( red )
542  if ( key.isNull() )
543  if ( const char * fpr = sig.fingerprint() )
544  return i18n("Bad signature by unknown certificate %1: %2", QString::fromLatin1( fpr ), QString::fromLocal8Bit( sig.status().asString() ) );
545  else
546  return i18n("Bad signature by an unknown certificate: %1", QString::fromLocal8Bit( sig.status().asString() ) );
547  else
548  return i18n("Bad signature by %1: %2", keyToString( key ), QString::fromLocal8Bit( sig.status().asString() ) );
549 
550  else if ( valid )
551  if ( key.isNull() )
552  if ( const char * fpr = sig.fingerprint() )
553  return i18n("Good signature by unknown certificate %1.", QString::fromLatin1( fpr ) );
554  else
555  return i18n("Good signature by an unknown certificate.");
556  else
557  return i18n("Good signature by %1.", keyToString( key ) );
558 
559  else
560  if ( key.isNull() )
561  if ( const char * fpr = sig.fingerprint() )
562  return i18n("Invalid signature by unknown certificate %1: %2", QString::fromLatin1( fpr ), QString::fromLocal8Bit( sig.status().asString() ) );
563  else
564  return i18n("Invalid signature by an unknown certificate: %1", QString::fromLocal8Bit( sig.status().asString() ) );
565  else
566  return i18n("Invalid signature by %1: %2", keyToString( key ), QString::fromLocal8Bit( sig.status().asString() ) );
567 }
568 
569 //
570 // ImportResult
571 //
572 
573 QString Formatting::importMetaData( const Import & import, const QStringList & ids ) {
574  const QString result = importMetaData( import );
575  if ( result.isEmpty() )
576  return QString();
577  else
578  return result + QLatin1Char('\n') +
579  i18n("This certificate was imported from the following sources:") + QLatin1Char('\n') +
580  ids.join(QLatin1String("\n"));
581 }
582 
583 QString Formatting::importMetaData( const Import & import ) {
584 
585  if ( import.isNull() )
586  return QString();
587 
588  if ( import.error().isCanceled() )
589  return i18n( "The import of this certificate was canceled." );
590  if ( import.error() )
591  return i18n( "An error occurred importing this certificate: %1",
592  QString::fromLocal8Bit( import.error().asString() ) );
593 
594  const unsigned int status = import.status();
595  if ( status & Import::NewKey )
596  return ( status & Import::ContainedSecretKey )
597  ? i18n( "This certificate was new to your keystore. The secret key is available." )
598  : i18n( "This certificate is new to your keystore." ) ;
599 
600  QStringList results;
601  if ( status & Import::NewUserIDs )
602  results.push_back( i18n( "New user-ids were added to this certificate by the import." ) );
603  if ( status & Import::NewSignatures )
604  results.push_back( i18n( "New signatures were added to this certificate by the import." ) );
605  if ( status & Import::NewSubkeys )
606  results.push_back( i18n( "New subkeys were added to this certificate by the import." ) );
607 
608  return results.empty()
609  ? i18n( "The import contained no new data for this certificate. It is unchanged.")
610  : results.join( QLatin1String("\n") );
611 }
612 
613 
614 //
615 // Overview in CertificateDetailsDialog
616 //
617 
618 QString Formatting::formatOverview( const Key & key ) {
619  return toolTip( key, AllOptions );
620 }
flags
static const char * flags[]
Definition: readerstatus.cpp:115
Kleo::Formatting::CertificateType
Definition: formatting.h:75
Kleo::Formatting::ownerTrustShort
QString ownerTrustShort(const GpgME::Key &key)
Unknown
Definition: setinitialpindialog.cpp:55
Kleo::Formatting::type
QString type(const GpgME::Key &key)
email
static std::string email(const UserID &uid)
Definition: keycache.cpp:593
Kleo::Formatting::prettyKeyID
QString prettyKeyID(const char *id)
Definition: formatting.cpp:137
Kleo::Formatting::formatOverview
QString formatOverview(const GpgME::Key &key)
Kleo::Formatting::creationDateString
QString creationDateString(const GpgME::Key &key)
Kleo::Formatting::displayName
QString displayName(GpgME::Protocol prot)
Kleo::Formatting::toolTip
QString toolTip(const GpgME::Key &key, int opts)
formatting.h
Kleo::Formatting::expirationDateString
QString expirationDateString(const GpgME::Key &key)
Kleo::Formatting::UserIDs
Definition: formatting.h:78
Kleo::Formatting::prettyUserID
QString prettyUserID(const GpgME::UserID &uid)
status
VerifyChecksumsDialog::Status status
Definition: verifychecksumscontroller.cpp:512
kleo_assert.h
Kleo::Formatting::formatForComboBox
QString formatForComboBox(const GpgME::Key &key)
Definition: formatting.cpp:497
Kleo::Class::OpenPGP
Definition: classify.h:49
Kleo::Formatting::ExpiryDates
Definition: formatting.h:74
Kleo::Formatting::validityShort
QString validityShort(const GpgME::Subkey &subkey)
Kleo::Formatting::Issuer
Definition: formatting.h:72
Kleo::Formatting::expirationDate
QDate expirationDate(const GpgME::Key &key)
Kleo::Class::CMS
Definition: classify.h:48
Kleo::Formatting::summaryToString
const char * summaryToString(const GpgME::Signature::Summary summary)
Kleo::Formatting::prettyNameAndEMail
QString prettyNameAndEMail(int proto, const char *id, const char *name, const char *email, const char *comment)
Definition: formatting.cpp:87
Kleo::Formatting::prettyEMail
QString prettyEMail(const char *email, const char *id)
Definition: formatting.cpp:184
kleo_assert
#define kleo_assert(cond)
Definition: kleo_assert.h:84
Kleo::Formatting::signatureToString
QString signatureToString(const GpgME::Signature &sig, const GpgME::Key &key)
Kleo::Formatting::creationDate
QDate creationDate(const GpgME::Key &key)
Kleo::Formatting::importMetaData
QString importMetaData(const GpgME::Import &import)
Kleo::Formatting::AllOptions
Definition: formatting.h:81
Kleo::Formatting::prettyName
QString prettyName(int proto, const char *id, const char *name, const char *comment)
Definition: formatting.cpp:64
Kleo::Formatting::StorageLocation
Definition: formatting.h:70
Kleo::Formatting::CertificateUsage
Definition: formatting.h:76
name
const char * name
Definition: uiserver/selectcertificatecommand.cpp:114
Kleo::Formatting::Validity
Definition: formatting.h:69
Kleo::Formatting::SerialNumber
Definition: formatting.h:71
Kleo::Formatting::OwnerTrust
Definition: formatting.h:79
Kleo::Formatting::formatKeyLink
QString formatKeyLink(const GpgME::Key &key)
Kleo::Formatting::KeyID
Definition: formatting.h:68
Kleo::Formatting::Fingerprint
Definition: formatting.h:77
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:56:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kleopatra

Skip menu "kleopatra"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal