Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.OSTree.Interfaces.Sign
Description
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
- signReadPk :: (HasCallStack, MonadIO m, IsSign a, IsInputStream b) => a -> b -> m BlobReader
- signReadSk :: (HasCallStack, MonadIO m, IsSign a, IsInputStream b) => a -> b -> m BlobReader
- 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.
Constructors
Sign (ManagedPtr Sign) |
Instances
Eq Sign Source # | |
GObject Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign | |
ManagedPtrNewtype Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign Methods 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 Methods gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe Sign -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe Sign) # | |
type ParentTypes Sign Source # | |
Defined in GI.OSTree.Interfaces.Sign type ParentTypes Sign = '[Object] |
Methods
Click to display all available methods, including inherited ones
Methods
addPk, bindProperty, bindPropertyFull, clearKeys, commit, commitVerify, data, dataVerify, ed25519AddPk, ed25519ClearKeys, ed25519Data, ed25519DataVerify, ed25519GetName, ed25519LoadPk, ed25519MetadataFormat, ed25519MetadataKey, ed25519SetPk, ed25519SetSk, forceFloating, freezeNotify, getv, isFloating, loadPk, metadataFormat, metadataKey, notify, notifyByPspec, readPk, readSk, ref, refSink, runDispose, stealData, stealQdata, summary, thawNotify, unref, watchClosure.
Getters
getData, getName, getProperty, getQdata.
Setters
addPk
Arguments
:: (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
Clear all previously preloaded secret and public keys.
Since: 2020.2
commit
Arguments
:: (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
Arguments
:: (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
Arguments
:: (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
Arguments
:: (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
Arguments
:: (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
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m Sign | Returns: New signing engine, or |
Create a new instance of a signing engine.
Since: 2020.2
getName
Arguments
:: (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
Arguments
:: (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 from
* basedir
-- 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
Arguments
:: (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
Arguments
:: (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
readPk
Arguments
:: (HasCallStack, MonadIO m, IsSign a, IsInputStream b) | |
=> a |
|
-> b |
|
-> m BlobReader | Returns: a |
Start reading public keys from a stream.
Since: 2025.2
readSk
Arguments
:: (HasCallStack, MonadIO m, IsSign a, IsInputStream b) | |
=> a |
|
-> b |
|
-> m BlobReader | Returns: a |
Start reading secret keys from a stream.
Since: 2025.2
setPk
Arguments
:: (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
Arguments
:: (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
Arguments
:: (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