gi-ostree-1.0.18: OSTree bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.OSTree.Interfaces.Sign

Description

No description available in the introspection data.

Synopsis

Exported types

newtype Sign Source #

Memory-managed wrapper type.

Constructors

Sign (ManagedPtr Sign) 

Instances

Instances details
Eq Sign Source # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

Methods

(==) :: Sign -> Sign -> Bool #

(/=) :: Sign -> Sign -> Bool #

GObject Sign Source # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

ManagedPtrNewtype Sign Source # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

Methods

toManagedPtr :: Sign -> ManagedPtr Sign

TypedObject Sign Source # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

Methods

glibType :: IO GType

HasParentTypes Sign Source # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

IsGValue (Maybe Sign) Source #

Convert Sign to and from GValue. See toGValue and fromGValue.

Instance details

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 # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

type ParentTypes Sign = '[Object]

class (GObject o, IsDescendantOf Sign o) => IsSign o Source #

Type class for types which can be safely cast to Sign, for instance with toSign.

Instances

Instances details
(GObject o, IsDescendantOf Sign o) => IsSign o Source # 
Instance details

Defined in GI.OSTree.Interfaces.Sign

toSign :: (MonadIO m, IsSign o) => o -> m Sign Source #

Cast to Sign, for types for which this is known to be safe. For general casts, use castTo.

Methods

addPk

signAddPk Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> GVariant

publicKey: single public key to be added

-> m ()

(Can throw GError)

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

signClearKeys Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> m ()

(Can throw GError)

Clear all previously preloaded secret and public keys.

Since: 2020.2

commit

signCommit Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) 
=> a

self: an Sign object

-> b

repo: an OsreeRepo object

-> Text

commitChecksum: SHA256 of given commit to sign

-> Maybe c

cancellable: A Cancellable

-> m ()

(Can throw GError)

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

signCommitVerify Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) 
=> a

self: an Sign object

-> b

repo: an OsreeRepo object

-> Text

commitChecksum: SHA256 of given commit to verify

-> Maybe c

cancellable: A Cancellable

-> m (Maybe Text)

(Can throw GError)

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

signData Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a, IsCancellable b) 
=> a

self: an Sign object

-> Bytes

data: the raw data to be signed with pre-loaded secret key

-> Maybe b

cancellable: A Cancellable

-> m Bytes

(Can throw GError)

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

signDataVerify Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> Bytes

data: the raw data to check

-> GVariant

signatures: the signatures to be checked

-> m (Maybe Text)

(Can throw GError)

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

signGetAll Source #

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

signGetByName Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the name of desired signature engine

-> m Sign

Returns: New signing engine, or Nothing if the engine is not known (Can throw GError)

Create a new instance of a signing engine.

Since: 2020.2

getName

signGetName Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> m Text

Returns: pointer to the name nULL in case of error (unlikely).

Return the pointer to the name of currently used/selected signing engine.

Since: 2020.2

loadPk

signLoadPk Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> GVariant

options: any options

-> m ()

(Can throw GError)

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

signMetadataFormat Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> m Text

Returns: pointer to the metadata format, nULL in case of error (unlikely).

Return the pointer to the string with format used in (detached) metadata for current signing engine.

Since: 2020.2

metadataKey

signMetadataKey Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> m Text

Returns: pointer to the metadata key name, nULL in case of error (unlikely).

Return the pointer to the name of the key used in (detached) metadata for current signing engine.

Since: 2020.2

setPk

signSetPk Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> GVariant

publicKey: single public key to be added

-> m ()

(Can throw GError)

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

signSetSk Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a) 
=> a

self: an Sign object

-> GVariant

secretKey: secret key to be added

-> m ()

(Can throw GError)

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

signSummary Source #

Arguments

:: (HasCallStack, MonadIO m, IsSign a, IsRepo b, IsCancellable c) 
=> a

self: Self

-> b

repo: ostree repository

-> GVariant

keys: keys -- GVariant containing keys as GVarints specific to signature type.

-> Maybe c

cancellable: A Cancellable

-> m ()

(Can throw GError)

Add a signature to a summary file. Based on ostree_repo_add_gpg_signature_summary implementation.

Since: 2020.2