29 #ifndef cryptplugwrapper_h
30 #define cryptplugwrapper_h
34 #ifndef LIBKLEOPATRA_NO_COMPAT
49 #include "kleo/cryptobackend.h"
51 #include <tqdatetime.h>
53 #include <tqvaluelist.h>
55 #include <tqstringlist.h>
57 #include <tdemacros.h>
65 class KeyGenerationResult;
73 class VerifyDetachedJob;
74 class VerifyOpaqueJob;
75 class KeyGenerationJob;
81 class DecryptVerifyJob;
455 static TQString errorIdToText(
int errId,
bool & isPassphraseError );
471 IniStatus_NoLibName = 2,
472 IniStatus_LoadError = 0x1000,
473 IniStatus_InitError = 0x2000
502 SigStatus_UNKNOWN = 0x0000,
503 SigStatus_VALID = SigStat_VALID,
504 SigStatus_GREEN = SigStat_GREEN,
505 SigStatus_RED = SigStat_RED,
506 SigStatus_KEY_REVOKED = SigStat_KEY_REVOKED,
507 SigStatus_KEY_EXPIRED = SigStat_KEY_EXPIRED,
508 SigStatus_SIG_EXPIRED = SigStat_SIG_EXPIRED,
509 SigStatus_KEY_MISSING = SigStat_KEY_MISSING,
510 SigStatus_CRL_MISSING = SigStat_CRL_MISSING,
511 SigStatus_CRL_TOO_OLD = SigStat_CRL_TOO_OLD,
512 SigStatus_BAD_POLICY = SigStat_BAD_POLICY,
513 SigStatus_SYS_ERROR = SigStat_SYS_ERROR,
515 SigStatus_NUMERICAL_CODE = 0x8000
517 typedef unsigned long SigStatusFlags;
521 CerStatus_EXPIRES_NEVER = CRYPTPLUG_CERT_DOES_NEVER_EXPIRE
549 const TQString& libName=TQString(),
550 const TQString& update=TQString(),
551 bool active =
false );
564 TQString protocol()
const;
566 TQString name()
const {
595 void setActive(
bool active );
631 bool setLibName(
const TQString& libName );
641 TQString libName()
const;
648 void setDisplayName(
const TQString& name );
655 TQString displayName()
const;
675 bool initialize( IniStatus* iniStatus, TQString* errorMsg );
704 IniStatus iniStatus( TQString* errorMsg )
const;
721 bool hasFeature( ::Feature );
729 void freeSignatureMetaData( CryptPlug::SignatureMetaData* );
752 bool checkMessageSignature(
char** cleartext,
753 const char* signaturetext,
754 bool signatureIsBinary,
756 CryptPlug::SignatureMetaData* sigmeta );
768 bool decryptMessage(
const char* ciphertext,
772 const char* certificate,
788 bool decryptAndCheckMessage(
const char* ciphertext,
792 const char* certificate,
793 bool* signatureFound,
794 CryptPlug::SignatureMetaData* sigmeta,
798 Kleo::KeyListJob * keyListJob(
bool remote=
false,
bool includeSigs=
false,
bool validate=
true )
const;
799 Kleo::EncryptJob * encryptJob(
bool armor=
false,
bool textmode=
false )
const;
801 Kleo::SignJob * signJob(
bool armor=
false,
bool textMode=
false )
const;
808 Kleo::ExportJob * secretKeyExportJob(
bool armor=
false,
const TQString& charset = TQString() )
const;
816 Kleo::SpecialJob * specialJob(
const char *,
const TQStringVariantMap & )
const {
return 0; }
818 GpgME::ImportResult importCertificate(
const char* data,
size_t length );
820 CryptPlug * cryptPlug()
const {
return _cp; }
827 IniStatus _iniStatus;
831 bool mAlwaysEncryptToSelf;
This class provides C++ access to the CRYPTPLUG API.
An abstract base class for asynchronous decrypters.
An abstract base class for asynchronous combined decrypters and verifiers.
An abstract base class for asynchronous deleters.
An abstract base class for asynchronous downloaders.
An abstract base class for asynchronous encrypters.
An abstract base class for asynchronous exporters.
An abstract base class for asynchronous importers.
An abstract base class for asynchronous key generation.
An abstract base class for asynchronous key listers.
An abstract base class for asynchronous key refreshers.
An abstract base class for asynchronous combined signing and encrypting.
An abstract base class for asynchronous signing.
An abstract base class for protocol-specific jobs.
An abstract base class for asynchronous verification of detached signatures.
An abstract base class for asynchronous verification of opaque signatures.
CryptoConfig implementation around the gpgconf command-line tool For method docu, see kleo/cryptoconf...
This class provides C++ access to the StructuringInfo helper struct that is specified in cryptplug....
Common API header for CRYPTPLUG.
Information record returned by signing and by encrypting functions - this record should be used toget...