12 #ifndef ZYPP_KEYRING_H 13 #define ZYPP_KEYRING_H 153 ACCEPT_NOTHING = 0x0000,
154 ACCEPT_UNSIGNED_FILE = 0x0001,
155 ACCEPT_UNKNOWNKEY = 0x0002,
156 TRUST_KEY_TEMPORARILY = 0x0004,
157 TRUST_AND_IMPORT_KEY = 0x0008,
158 ACCEPT_VERIFICATION_FAILED = 0x0010,
163 static DefaultAccept defaultAccept();
166 static void setDefaultAccept( DefaultAccept value_r );
175 KeyRing(
const Pathname &baseTmpDir);
181 void importKey(
const PublicKey &key,
bool trusted =
false);
184 void multiKeyImport(
const Pathname & keyfile_r,
bool trusted_r =
false );
187 { dumpPublicKey(
id,
true, stream); }
190 { dumpPublicKey(
id,
false, stream); }
192 void dumpPublicKey(
const std::string &
id,
bool trusted, std::ostream &stream );
203 std::string readSignatureKeyId(
const Pathname &signature );
208 bool isKeyTrusted(
const std::string &
id );
214 bool isKeyKnown(
const std::string &
id );
220 void deleteKey(
const std::string &
id,
bool trusted =
false );
225 std::list<PublicKey> publicKeys();
230 std::list<PublicKey> trustedPublicKeys();
235 std::list<PublicKeyData> publicKeyData();
240 std::list<PublicKeyData> trustedPublicKeyData();
272 bool verifyFileSignatureWorkflow(
const Pathname &file,
const std::string &filedesc,
const Pathname &signature,
bool & sigValid_r,
const KeyContext &keycontext =
KeyContext());
274 bool verifyFileSignatureWorkflow(
const Pathname &file,
const std::string filedesc,
const Pathname &signature,
const KeyContext &keycontext =
KeyContext());
282 bool verifyFileSignature(
const Pathname &file,
const Pathname &signature );
284 bool verifyFileTrustedSignature(
const Pathname &file,
const Pathname &signature );
320 #endif // ZYPP_KEYRING_H
ZYPP_DECLARE_FLAGS(VendorSupportOptions, VendorSupportOption)
void dumpTrustedPublicKey(const std::string &id, std::ostream &stream)
This basically means, we knew the key, but it was not trusted.
KeyRingException(const std::string &msg_r)
Ctor taking message.
Class representing one GPG Public Keys data.
ZYPP_DECLARE_OPERATORS_FOR_FLAGS(DiskUsageCounter::MountPoint::HintFlags)
virtual bool askUserToAcceptUnsignedFile(const std::string &file, const KeyContext &keycontext=KeyContext())
String related utilities and Regular expression matching.
virtual bool askUserToAcceptUnknownKey(const std::string &file, const std::string &id, const KeyContext &keycontext=KeyContext())
we DONT know the key, only its id, but we have never seen it, the difference with trust key is that i...
KeyRingException()
Ctor taking message.
Internal connection to rpm database.
virtual void infoVerify(const std::string &file_r, const PublicKeyData &keyData_r, const KeyContext &keycontext=KeyContext())
Informal callback showing the trusted key that will be used for verification.
KeyTrust
User reply options for the askUserToTrustKey callback.
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
void dumpUntrustedPublicKey(const std::string &id, std::ostream &stream)
std::ostream & operator<<(std::ostream &str, const Exception &obj)
DEFINE_PTR_TYPE(Application)
std::ostream & operator<<(std::ostream &str, const KeyRing &)
virtual void trustedKeyAdded(const PublicKey &)
Base class for reference counted objects.
User has chosen not to trust the key.
DefaultAcceptBits
DefaultAccept flags (
virtual KeyTrust askUserToAcceptKey(const PublicKey &key, const KeyContext &keycontext=KeyContext())
Ask user to trust and/or import the key to trusted keyring.
RW_pointer< Impl > _pimpl
Pointer to implementation.
Class representing one GPG Public Key (PublicKeyData + ASCII armored in a tempfile).
Base class for Exception.
Callbacks from signature verification workflow.
Easy-to use interface to the ZYPP dependency resolver.
virtual void trustedKeyRemoved(const PublicKey &)
virtual ~KeyRingException()
Dtor.
virtual bool askUserToAcceptVerificationFailed(const std::string &file, const PublicKey &key, const KeyContext &keycontext=KeyContext())
The file filedesc is signed but the verification failed.