Ejemplo n.º 1
0
void CertListView::slotResult( const GpgME::KeyListResult & result ) {
  kdDebug() << "CertListView::slotResult()" << endl;
  if ( result.isNull() )
    QMessageBox::information( this, "Key Listing Result", "KeyListResult is null!" );
  else if ( result.error() )
    QMessageBox::critical( this, "Key Listing Result",
			   QString("KeyListResult Error: %1").arg( result.error().asString() ) );
  else if ( result.isTruncated() )
    QMessageBox::information( this, "Key Listing Result", "KeyListResult is truncated!" );
  else
    QMessageBox::information( this, "Key Listing Result", "Key listing successful" );
}
Ejemplo n.º 2
0
GpgME::KeyListResult Kleo::QGpgMEKeyListJob::attemptSyncKeyListing( std::vector<GpgME::Key> & keys ) {
  GpgME::KeyListResult result;
  for ( const char* * chunk = patterns() ; chunk ; chunk = nextChunk() ) {

    if ( const GpgME::Error err = mCtx->startKeyListing( chunk, mSecretOnly ) )
      return GpgME::KeyListResult( 0, err );

    GpgME::Error err;
    do
      keys.push_back( mCtx->nextKey( err ) );
    while ( !err );
    keys.pop_back();
    result.mergeWith( mCtx->endKeyListing() );
    if ( result.error() )
      break;
  }
  return result;
}
Ejemplo n.º 3
0
void CertificateInfoWidgetImpl::slotCertificateChainListingResult( const GpgME::KeyListResult & res ) {
  if ( res.error() )
    return showChainListError( this, res.error(), mChain.front().issuerName() );
  else
    startCertificateChainListing();
}