12 #ifndef ZYPP_KEYRING_H 13 #define ZYPP_KEYRING_H 172 ACCEPT_NOTHING = 0x0000,
173 ACCEPT_UNSIGNED_FILE = 0x0001,
174 ACCEPT_UNKNOWNKEY = 0x0002,
175 TRUST_KEY_TEMPORARILY = 0x0004,
176 TRUST_AND_IMPORT_KEY = 0x0008,
177 ACCEPT_VERIFICATION_FAILED = 0x0010,
182 static DefaultAccept defaultAccept();
185 static void setDefaultAccept( DefaultAccept value_r );
200 void importKey(
const PublicKey &key,
bool trusted =
false);
203 void multiKeyImport(
const Pathname & keyfile_r,
bool trusted_r =
false );
206 { dumpPublicKey(
id,
true, stream); }
209 { dumpPublicKey(
id,
false, stream); }
211 void dumpPublicKey(
const std::string &
id,
bool trusted, std::ostream &stream );
222 std::string readSignatureKeyId(
const Pathname &signature );
227 bool isKeyTrusted(
const std::string &
id );
233 bool isKeyKnown(
const std::string &
id );
239 void deleteKey(
const std::string &
id,
bool trusted =
false );
244 std::list<PublicKey> publicKeys();
249 std::list<PublicKey> trustedPublicKeys();
254 std::list<PublicKeyData> publicKeyData();
259 std::list<PublicKeyData> trustedPublicKeyData();
296 bool verifyFileSignatureWorkflow(
const Pathname &file,
const std::string &filedesc,
const Pathname &signature,
bool & sigValid_r,
const KeyContext &keycontext =
KeyContext());
306 bool verifyFileSignature(
const Pathname &file,
const Pathname &signature );
308 bool verifyFileTrustedSignature(
const Pathname &file,
const Pathname &signature );
344 #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.
bool askUserToAcceptPackageKey(const PublicKey &key_r, const KeyContext &keycontext_r=KeyContext())
Ask user to trust and/or import the package key to trusted keyring, using ReportBase::report.
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.
static constexpr const char * ACCEPT_PACKAGE_KEY_REQUEST
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.