12 #ifndef ZYPP_KEYRING_H 13 #define ZYPP_KEYRING_H 186 ACCEPT_NOTHING = 0x0000,
187 ACCEPT_UNSIGNED_FILE = 0x0001,
188 ACCEPT_UNKNOWNKEY = 0x0002,
189 TRUST_KEY_TEMPORARILY = 0x0004,
190 TRUST_AND_IMPORT_KEY = 0x0008,
191 ACCEPT_VERIFICATION_FAILED = 0x0010,
196 static DefaultAccept defaultAccept();
199 static void setDefaultAccept( DefaultAccept value_r );
214 void importKey(
const PublicKey &key,
bool trusted =
false);
217 void multiKeyImport(
const Pathname & keyfile_r,
bool trusted_r =
false );
220 { dumpPublicKey(
id,
true, stream); }
223 { dumpPublicKey(
id,
false, stream); }
225 void dumpPublicKey(
const std::string &
id,
bool trusted, std::ostream &stream );
236 std::string readSignatureKeyId(
const Pathname &signature );
241 bool isKeyTrusted(
const std::string &
id );
247 bool isKeyKnown(
const std::string &
id );
253 void deleteKey(
const std::string &
id,
bool trusted =
false );
258 std::list<PublicKey> publicKeys();
263 std::list<PublicKey> trustedPublicKeys();
268 std::list<PublicKeyData> publicKeyData();
273 std::list<PublicKeyData> trustedPublicKeyData();
310 bool verifyFileSignatureWorkflow(
const Pathname &file,
const std::string &filedesc,
const Pathname &signature,
bool & sigValid_r,
const KeyContext &keycontext =
KeyContext());
320 bool verifyFileSignature(
const Pathname &file,
const Pathname &signature );
322 bool verifyFileTrustedSignature(
const Pathname &file,
const Pathname &signature );
328 bool provideAndImportKeyFromRepositoryWorkflow (
const std::string &
id ,
const RepoInfo &info );
364 #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.
void reportNonImportedKeys(const std::set< Edition > &keys_r)
Notify the user about keys that were not imported from the rpm key database into zypp keyring...
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.
What is known about a repository.
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.
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.
static constexpr const char * KEYS_NOT_IMPORTED_REPORT
Easy-to use interface to the ZYPP dependency resolver.
virtual void trustedKeyRemoved(const PublicKey &)
static constexpr const char * ACCEPT_PACKAGE_KEY_REQUEST
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.