Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype Sign = Sign (ManagedPtr Sign)
- class (GObject o, IsDescendantOf Sign o) => IsSign o
- toSign :: (MonadIO m, IsSign o) => o -> m Sign
- signAddPk :: (HasCallStack, MonadIO m, IsSign a) => a -> GVariant -> m ()
- signClearKeys :: (HasCallStack, MonadIO m, IsSign a) => a -> m ()
- signCommit :: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) => a -> b -> Text -> Maybe c -> m ()
- signCommitVerify :: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) => a -> b -> Text -> Maybe c -> m (Maybe Text)
- signData :: (HasCallStack, MonadIO m, IsSign a, IsCancellable b) => a -> Bytes -> Maybe b -> m Bytes
- signDataVerify :: (HasCallStack, MonadIO m, IsSign a) => a -> Bytes -> GVariant -> m (Maybe Text)
- signGetAll :: (HasCallStack, MonadIO m) => m [Sign]
- signGetByName :: (HasCallStack, MonadIO m) => Text -> m Sign
- signGetName :: (HasCallStack, MonadIO m, IsSign a) => a -> m Text
- signLoadPk :: (HasCallStack, MonadIO m, IsSign a) => a -> GVariant -> m ()
- signMetadataFormat :: (HasCallStack, MonadIO m, IsSign a) => a -> m Text
- signMetadataKey :: (HasCallStack, MonadIO m, IsSign a) => a -> m Text
- signSetPk :: (HasCallStack, MonadIO m, IsSign a) => a -> GVariant -> m ()
- signSetSk :: (HasCallStack, MonadIO m, IsSign a) => a -> GVariant -> m ()
- signSummary :: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) => a -> b -> GVariant -> Maybe c -> m ()
Exported types
Memory-managed wrapper type.
Instances
Eq Sign Source # | |
GObject Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign | |
ManagedPtrNewtype Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign toManagedPtr :: Sign -> ManagedPtr Sign # | |
TypedObject Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign | |
HasParentTypes Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign | |
IsGValue (Maybe Sign) Source # | Convert |
Defined in GI.OSTree.Interfaces.Sign | |
type ParentTypes Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign |
class (GObject o, IsDescendantOf Sign o) => IsSign o Source #
Instances
(GObject o, IsDescendantOf Sign o) => IsSign o Source # | |
Defined in GI.OSTree.Interfaces.Sign |
Methods
Click to display all available methods, including inherited ones
Methods
addPk, bindProperty, bindPropertyFull, clearKeys, commit, commitVerify, data, dataVerify, dummyAddPk, dummyData, dummyDataVerify, dummyGetName, dummyMetadataFormat, dummyMetadataKey, dummySetPk, dummySetSk, ed25519AddPk, ed25519ClearKeys, ed25519Data, ed25519DataVerify, ed25519GetName, ed25519LoadPk, ed25519MetadataFormat, ed25519MetadataKey, ed25519SetPk, ed25519SetSk, forceFloating, freezeNotify, getv, isFloating, loadPk, metadataFormat, metadataKey, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, summary, thawNotify, unref, watchClosure.
Getters
getData, getName, getProperty, getQdata.
Setters
addPk
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> GVariant |
|
-> m () | (Can throw |
Add the public key for verification. Could be called multiple times for adding all needed keys to be used for verification.
The publicKey
argument depends of the particular engine implementation.
Since: 2020.2
clearKeys
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> m () | (Can throw |
Clear all previously preloaded secret and public keys.
Since: 2020.2
commit
:: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Text |
|
-> Maybe c |
|
-> m () | (Can throw |
Add a signature to a commit.
Depending of the signing engine used you will need to load
the secret key with ostree_sign_set_sk
.
Since: 2020.2
commitVerify
:: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> Text |
|
-> Maybe c |
|
-> m (Maybe Text) | (Can throw |
Verify if commit is signed with known key.
Depending of the signing engine used you will need to load
the public key(s) for verification with ostree_sign_set_pk
,
ostree_sign_add_pk
and/or ostree_sign_load_pk
.
Since: 2020.2
data
:: (HasCallStack, MonadIO m, IsSign a, IsCancellable b) | |
=> a |
|
-> Bytes |
|
-> Maybe b |
|
-> m Bytes | (Can throw |
Sign the given data
with pre-loaded secret key.
Depending of the signing engine used you will need to load
the secret key with ostree_sign_set_sk
.
Since: 2020.2
dataVerify
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> Bytes |
|
-> GVariant |
|
-> m (Maybe Text) | (Can throw |
Verify given data against signatures with pre-loaded public keys.
Depending of the signing engine used you will need to load
the public key(s) with ostree_sign_set_pk
, ostree_sign_add_pk
or ostree_sign_load_pk
.
Since: 2020.2
getAll
:: (HasCallStack, MonadIO m) | |
=> m [Sign] | Returns: an array of signing engines |
Return an array with newly allocated instances of all available signing engines; they will not be initialized.
Since: 2020.2
getByName
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Sign | Returns: New signing engine, or |
Create a new instance of a signing engine.
Since: 2020.2
getName
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> m Text | Returns: pointer to the name
|
Return the pointer to the name of currently used/selected signing engine.
Since: 2020.2
loadPk
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> GVariant |
|
-> m () | (Can throw |
Load public keys for verification from anywhere. It is expected that all keys would be added to already pre-loaded keys.
The options
argument depends of the particular engine implementation.
For example, ed25515
engine could use following string-formatted options:
filename
-- single file to use to load keys frombasedir
-- directory containing subdirectories 'trusted.ed25519.d' and 'revoked.ed25519.d' with appropriate public keys. Used for testing and re-definition of system-wide directories if defaults are not suitable for any reason.
Since: 2020.2
metadataFormat
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> m Text | Returns: pointer to the metadata format,
|
Return the pointer to the string with format used in (detached) metadata for current signing engine.
Since: 2020.2
metadataKey
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> m Text | Returns: pointer to the metadata key name,
|
Return the pointer to the name of the key used in (detached) metadata for current signing engine.
Since: 2020.2
setPk
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> GVariant |
|
-> m () | (Can throw |
Set the public key for verification. It is expected what all previously pre-loaded public keys will be dropped.
The publicKey
argument depends of the particular engine implementation.
Since: 2020.2
setSk
:: (HasCallStack, MonadIO m, IsSign a) | |
=> a |
|
-> GVariant |
|
-> m () | (Can throw |
Set the secret key to be used for signing data, commits and summary.
The secretKey
argument depends of the particular engine implementation.
Since: 2020.2
summary
:: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) | |
=> a |
|
-> b |
|
-> GVariant |
|
-> Maybe c |
|
-> m () | (Can throw |
Add a signature to a summary file. Based on ostree_repo_add_gpg_signature_summary implementation.
Since: 2020.2