botan-bindings-0.0.1.0: Raw Botan bindings
Copyright(c) Leo D 2023
LicenseBSD-3-Clause
Maintainerleo@apotheca.io
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe-Inferred
LanguageHaskell2010

Botan.Bindings.Error

Description

Error values below -10000 are reserved for the application (these can be returned from view functions).

Synopsis

Documentation

pattern BOTAN_FFI_SUCCESS :: (Eq a, Num a) => a Source #

Generally returned to indicate success

pattern BOTAN_FFI_INVALID_VERIFIER :: (Eq a, Num a) => a Source #

NOTE: this value is positive, but still represents an error condition. In indicates that the function completed successfully, but the value provided was not correct. For example botan_bcrypt_is_valid returns this value if the password did not match the hash.

pattern BOTAN_FFI_ERROR_INVALID_INPUT :: (Eq a, Num a) => a Source #

The input was invalid. (Currently this error return is not used.)

pattern BOTAN_FFI_ERROR_BAD_MAC :: (Eq a, Num a) => a Source #

While decrypting in an AEAD mode, the tag failed to verify.

pattern BOTAN_FFI_ERROR_INSUFFICIENT_BUFFER_SPACE :: (Eq a, Num a) => a Source #

Functions which write a variable amount of space return this if the indicated buffer length was insufficient to write the data. In that case, the output length parameter is set to the size that is required.

pattern BOTAN_FFI_ERROR_STRING_CONVERSION_ERROR :: (Eq a, Num a) => a Source #

A string view function which attempts to convert a string to a specified charset, and fails, can use this function to indicate the error.

pattern BOTAN_FFI_ERROR_EXCEPTION_THROWN :: (Eq a, Num a) => a Source #

An exception was thrown while processing this request, but no further details are available.

pattern BOTAN_FFI_ERROR_OUT_OF_MEMORY :: (Eq a, Num a) => a Source #

Memory allocation failed

pattern BOTAN_FFI_ERROR_SYSTEM_ERROR :: (Eq a, Num a) => a Source #

A system call failed

pattern BOTAN_FFI_ERROR_INTERNAL_ERROR :: (Eq a, Num a) => a Source #

An internal bug was encountered (please open a ticket on github)

pattern BOTAN_FFI_ERROR_BAD_FLAG :: (Eq a, Num a) => a Source #

A value provided in a flag variable was unknown.

pattern BOTAN_FFI_ERROR_NULL_POINTER :: (Eq a, Num a) => a Source #

A null pointer was provided as an argument where that is not allowed.

pattern BOTAN_FFI_ERROR_BAD_PARAMETER :: (Eq a, Num a) => a Source #

An argument did not match the function.

pattern BOTAN_FFI_ERROR_KEY_NOT_SET :: (Eq a, Num a) => a Source #

An object that requires a key normally must be keyed before use (eg before encrypting or MACing data). If this is not done, the operation will fail and return this error code.

pattern BOTAN_FFI_ERROR_INVALID_KEY_LENGTH :: (Eq a, Num a) => a Source #

An invalid key length was provided with a call to foo_set_key.

pattern BOTAN_FFI_ERROR_INVALID_OBJECT_STATE :: (Eq a, Num a) => a Source #

An operation was invoked that makes sense for the object, but it is in the wrong state to perform it.

pattern BOTAN_FFI_ERROR_NOT_IMPLEMENTED :: (Eq a, Num a) => a Source #

This is returned if the functionality is not available for some reason. For example if you call botan_hash_init with a named hash function which is not enabled, this error is returned.

pattern BOTAN_FFI_ERROR_INVALID_OBJECT :: (Eq a, Num a) => a Source #

This is used if an object provided did not match the function. For example calling botan_hash_destroy on a botan_rng_t object will cause this error.

pattern BOTAN_FFI_ERROR_TLS_ERROR :: (Eq a, Num a) => a Source #

pattern BOTAN_FFI_ERROR_HTTP_ERROR :: (Eq a, Num a) => a Source #

pattern BOTAN_FFI_ERROR_UNKNOWN_ERROR :: (Eq a, Num a) => a Source #

Something bad happened, but we are not sure why or how.