Module: GPGME

Defined in:
lib/gpgme/compat.rb,
lib/gpgme.rb,
lib/gpgme/ctx.rb,
lib/gpgme/key.rb,
lib/gpgme/data.rb,
lib/gpgme/misc.rb,
lib/gpgme/error.rb,
lib/gpgme/crypto.rb,
lib/gpgme/engine.rb,
lib/gpgme/ffi/ctx.rb,
lib/gpgme/ffi/key.rb,
lib/gpgme/key_sig.rb,
lib/gpgme/sub_key.rb,
lib/gpgme/user_id.rb,
lib/gpgme/version.rb,
lib/gpgme/ffi/data.rb,
lib/gpgme/ffi/meta.rb,
lib/gpgme/constants.rb,
lib/gpgme/ffi/enums.rb,
lib/gpgme/signature.rb,
lib/gpgme/key_common.rb,
lib/gpgme/ffi/key_sig.rb,
lib/gpgme/ffi/sub_key.rb,
lib/gpgme/ffi/user_id.rb,
lib/gpgme/io_callbacks.rb,
lib/gpgme/ffi/functions.rb,
lib/gpgme/ffi/signature.rb,
lib/gpgme/ffi/trust_item.rb,
lib/gpgme/ffi/engine_info.rb,
lib/gpgme/ffi/invalid_key.rb,
lib/gpgme/ffi/sign_result.rb,
lib/gpgme/ffi/sig_notation.rb,
lib/gpgme/ffi/import_result.rb,
lib/gpgme/ffi/import_status.rb,
lib/gpgme/ffi/new_signature.rb,
lib/gpgme/ffi/verify_result.rb,
lib/gpgme/ffi/decrypt_result.rb,
lib/gpgme/ffi/encrypt_result.rb

Overview

TODO: Find why is this needed. I guess the name compat means it’s just backwards compatibility. Consider removing?

Defined Under Namespace

Modules: Engine, KeyCommon, Library, Meta Classes: Crypto, Ctx, Data, DecryptResult, EncryptResult, EngineInfo, Error, IOCallbacks, ImportResult, ImportStatus, InvalidKey, Key, KeySig, NewSignature, SigNotation, SignResult, Signature, SubKey, TrustItem, UserID, VerifyResult

Constant Summary collapse

GpgmeError =
Error
GpgmeData =
Data
GpgmeEngineInfo =
EngineInfo
GpgmeCtx =
Ctx
GpgmeKey =
Key
GpgmeSubKey =
SubKey
GpgmeUserID =
UserID
GpgmeKeySig =
KeySig
GpgmeVerifyResult =
VerifyResult
GpgmeSignature =
Signature
GpgmeDecryptResult =
DecryptResult
GpgmeSignResult =
SignResult
GpgmeEncryptResult =
EncryptResult
GpgmeInvalidKey =
InvalidKey
GpgmeNewSignature =
NewSignature
GpgmeImportStatus =
ImportStatus
GpgmeImportResult =
ImportResult
VERSION =
"1.0.8"
ATTR_ALGO =
GPGME_ATTR_ALGO
ATTR_CAN_CERTIFY =
GPGME_ATTR_CAN_CERTIFY
ATTR_CAN_ENCRYPT =
GPGME_ATTR_CAN_ENCRYPT
ATTR_CAN_SIGN =
GPGME_ATTR_CAN_SIGN
ATTR_CHAINID =
GPGME_ATTR_CHAINID
ATTR_COMMENT =
GPGME_ATTR_COMMENT
ATTR_CREATED =
GPGME_ATTR_CREATED
ATTR_EMAIL =
GPGME_ATTR_EMAIL
ATTR_ERRTOK =
GPGME_ATTR_ERRTOK
ATTR_EXPIRE =
GPGME_ATTR_EXPIRE
ATTR_FPR =
GPGME_ATTR_FPR
ATTR_ISSUER =
GPGME_ATTR_ISSUER
ATTR_IS_SECRET =
GPGME_ATTR_IS_SECRET
ATTR_KEYID =
GPGME_ATTR_KEYID
ATTR_KEY_CAPS =
GPGME_ATTR_KEY_CAPS
ATTR_KEY_DISABLED =
GPGME_ATTR_KEY_DISABLED
ATTR_KEY_EXPIRED =
GPGME_ATTR_KEY_EXPIRED
ATTR_KEY_INVALID =
GPGME_ATTR_KEY_INVALID
ATTR_KEY_REVOKED =
GPGME_ATTR_KEY_REVOKED
ATTR_LEN =
GPGME_ATTR_LEN
ATTR_LEVEL =
GPGME_ATTR_LEVEL
ATTR_NAME =
GPGME_ATTR_NAME
ATTR_OTRUST =
GPGME_ATTR_OTRUST
ATTR_SERIAL =
GPGME_ATTR_SERIAL
ATTR_SIG_STATUS =
GPGME_ATTR_SIG_STATUS
ATTR_SIG_SUMMARY =
GPGME_ATTR_SIG_SUMMARY
ATTR_TYPE =
GPGME_ATTR_TYPE
ATTR_UID_INVALID =
GPGME_ATTR_UID_INVALID
ATTR_UID_REVOKED =
GPGME_ATTR_UID_REVOKED
ATTR_USERID =
GPGME_ATTR_USERID
ATTR_VALIDITY =
GPGME_ATTR_VALIDITY
DATA_ENCODING_ARMOR =
GPGME_DATA_ENCODING_ARMOR
DATA_ENCODING_BASE64 =
GPGME_DATA_ENCODING_BASE64
DATA_ENCODING_BINARY =
GPGME_DATA_ENCODING_BINARY
DATA_ENCODING_NONE =
GPGME_DATA_ENCODING_NONE
ENCRYPT_ALWAYS_TRUST =
GPGME_ENCRYPT_ALWAYS_TRUST
IMPORT_NEW =
GPGME_IMPORT_NEW
IMPORT_SECRET =
GPGME_IMPORT_SECRET
IMPORT_SIG =
GPGME_IMPORT_SIG
IMPORT_SUBKEY =
GPGME_IMPORT_SUBKEY
IMPORT_UID =
GPGME_IMPORT_UID
KEYLIST_MODE_EXTERN =
GPGME_KEYLIST_MODE_EXTERN
KEYLIST_MODE_LOCAL =
GPGME_KEYLIST_MODE_LOCAL
KEYLIST_MODE_SIGS =
GPGME_KEYLIST_MODE_SIGS
KEYLIST_MODE_VALIDATE =
GPGME_KEYLIST_MODE_VALIDATE
MD_CRC24_RFC2440 =
GPGME_MD_CRC24_RFC2440
MD_CRC32 =
GPGME_MD_CRC32
MD_CRC32_RFC1510 =
GPGME_MD_CRC32_RFC1510
MD_HAVAL =
GPGME_MD_HAVAL
MD_MD2 =
GPGME_MD_MD2
MD_MD4 =
GPGME_MD_MD4
MD_MD5 =
GPGME_MD_MD5
MD_RMD160 =
GPGME_MD_RMD160
MD_SHA1 =
GPGME_MD_SHA1
MD_SHA256 =
GPGME_MD_SHA256
MD_SHA384 =
GPGME_MD_SHA384
MD_SHA512 =
GPGME_MD_SHA512
MD_TIGER =
GPGME_MD_TIGER
PK_DSA =
GPGME_PK_DSA
PK_ELG =
GPGME_PK_ELG
PK_ELG_E =
GPGME_PK_ELG_E
PK_RSA =
GPGME_PK_RSA
PROTOCOL_CMS =
GPGME_PROTOCOL_CMS
PROTOCOL_OpenPGP =
GPGME_PROTOCOL_OpenPGP
SIGSUM_BAD_POLICY =
GPGME_SIGSUM_BAD_POLICY
SIGSUM_CRL_MISSING =
GPGME_SIGSUM_CRL_MISSING
SIGSUM_CRL_TOO_OLD =
GPGME_SIGSUM_CRL_TOO_OLD
SIGSUM_GREEN =
GPGME_SIGSUM_GREEN
SIGSUM_KEY_EXPIRED =
GPGME_SIGSUM_KEY_EXPIRED
SIGSUM_KEY_MISSING =
GPGME_SIGSUM_KEY_MISSING
SIGSUM_KEY_REVOKED =
GPGME_SIGSUM_KEY_REVOKED
SIGSUM_RED =
GPGME_SIGSUM_RED
SIGSUM_SIG_EXPIRED =
GPGME_SIGSUM_SIG_EXPIRED
SIGSUM_SYS_ERROR =
GPGME_SIGSUM_SYS_ERROR
SIGSUM_VALID =
GPGME_SIGSUM_VALID
SIG_MODE_CLEAR =
GPGME_SIG_MODE_CLEAR
SIG_MODE_DETACH =
GPGME_SIG_MODE_DETACH
SIG_MODE_NORMAL =
GPGME_SIG_MODE_NORMAL
SIG_STAT_BAD =
GPGME_SIG_STAT_BAD
SIG_STAT_DIFF =
GPGME_SIG_STAT_DIFF
SIG_STAT_ERROR =
GPGME_SIG_STAT_ERROR
SIG_STAT_GOOD =
GPGME_SIG_STAT_GOOD
SIG_STAT_GOOD_EXP =
GPGME_SIG_STAT_GOOD_EXP
SIG_STAT_GOOD_EXPKEY =
GPGME_SIG_STAT_GOOD_EXPKEY
SIG_STAT_NOKEY =
GPGME_SIG_STAT_NOKEY
SIG_STAT_NONE =
GPGME_SIG_STAT_NONE
SIG_STAT_NOSIG =
GPGME_SIG_STAT_NOSIG
STATUS_ABORT =
GPGME_STATUS_ABORT
STATUS_ALREADY_SIGNED =
GPGME_STATUS_ALREADY_SIGNED
STATUS_BADARMOR =
GPGME_STATUS_BADARMOR
STATUS_BADMDC =
GPGME_STATUS_BADMDC
STATUS_BADSIG =
GPGME_STATUS_BADSIG
STATUS_BAD_PASSPHRASE =
GPGME_STATUS_BAD_PASSPHRASE
STATUS_BEGIN_DECRYPTION =
GPGME_STATUS_BEGIN_DECRYPTION
STATUS_BEGIN_ENCRYPTION =
GPGME_STATUS_BEGIN_ENCRYPTION
STATUS_BEGIN_STREAM =
GPGME_STATUS_BEGIN_STREAM
STATUS_DECRYPTION_FAILED =
GPGME_STATUS_DECRYPTION_FAILED
STATUS_DECRYPTION_OKAY =
GPGME_STATUS_DECRYPTION_OKAY
STATUS_DELETE_PROBLEM =
GPGME_STATUS_DELETE_PROBLEM
STATUS_ENC_TO =
GPGME_STATUS_ENC_TO
STATUS_END_DECRYPTION =
GPGME_STATUS_END_DECRYPTION
STATUS_END_ENCRYPTION =
GPGME_STATUS_END_ENCRYPTION
STATUS_END_STREAM =
GPGME_STATUS_END_STREAM
STATUS_ENTER =
GPGME_STATUS_ENTER
STATUS_EOF =
GPGME_STATUS_EOF
STATUS_ERRMDC =
GPGME_STATUS_ERRMDC
STATUS_ERROR =
GPGME_STATUS_ERROR
STATUS_ERRSIG =
GPGME_STATUS_ERRSIG
STATUS_EXPKEYSIG =
GPGME_STATUS_EXPKEYSIG
STATUS_EXPSIG =
GPGME_STATUS_EXPSIG
STATUS_FILE_DONE =
GPGME_STATUS_FILE_DONE
STATUS_FILE_ERROR =
GPGME_STATUS_FILE_ERROR
STATUS_FILE_START =
GPGME_STATUS_FILE_START
STATUS_GET_BOOL =
GPGME_STATUS_GET_BOOL
STATUS_GET_HIDDEN =
GPGME_STATUS_GET_HIDDEN
STATUS_GET_LINE =
GPGME_STATUS_GET_LINE
STATUS_GOODMDC =
GPGME_STATUS_GOODMDC
STATUS_GOODSIG =
GPGME_STATUS_GOODSIG
STATUS_GOOD_PASSPHRASE =
GPGME_STATUS_GOOD_PASSPHRASE
STATUS_GOT_IT =
GPGME_STATUS_GOT_IT
STATUS_IMPORTED =
GPGME_STATUS_IMPORTED
STATUS_IMPORT_RES =
GPGME_STATUS_IMPORT_RES
STATUS_INV_RECP =
GPGME_STATUS_INV_RECP
STATUS_KEYEXPIRED =
GPGME_STATUS_KEYEXPIRED
STATUS_KEYREVOKED =
GPGME_STATUS_KEYREVOKED
STATUS_KEY_CREATED =
GPGME_STATUS_KEY_CREATED
STATUS_LEAVE =
GPGME_STATUS_LEAVE
STATUS_MISSING_PASSPHRASE =
GPGME_STATUS_MISSING_PASSPHRASE
STATUS_NEED_PASSPHRASE =
GPGME_STATUS_NEED_PASSPHRASE
STATUS_NEED_PASSPHRASE_SYM =
GPGME_STATUS_NEED_PASSPHRASE_SYM
STATUS_NODATA =
GPGME_STATUS_NODATA
STATUS_NOTATION_DATA =
GPGME_STATUS_NOTATION_DATA
STATUS_NOTATION_NAME =
GPGME_STATUS_NOTATION_NAME
STATUS_NO_PUBKEY =
GPGME_STATUS_NO_PUBKEY
STATUS_NO_RECP =
GPGME_STATUS_NO_RECP
STATUS_NO_SECKEY =
GPGME_STATUS_NO_SECKEY
STATUS_POLICY_URL =
GPGME_STATUS_POLICY_URL
STATUS_PROGRESS =
GPGME_STATUS_PROGRESS
STATUS_RSA_OR_IDEA =
GPGME_STATUS_RSA_OR_IDEA
STATUS_SESSION_KEY =
GPGME_STATUS_SESSION_KEY
STATUS_SHM_GET =
GPGME_STATUS_SHM_GET
STATUS_SHM_GET_BOOL =
GPGME_STATUS_SHM_GET_BOOL
STATUS_SHM_GET_HIDDEN =
GPGME_STATUS_SHM_GET_HIDDEN
STATUS_SHM_INFO =
GPGME_STATUS_SHM_INFO
STATUS_SIGEXPIRED =
GPGME_STATUS_SIGEXPIRED
STATUS_SIG_CREATED =
GPGME_STATUS_SIG_CREATED
STATUS_SIG_ID =
GPGME_STATUS_SIG_ID
STATUS_TRUNCATED =
GPGME_STATUS_TRUNCATED
STATUS_TRUST_FULLY =
GPGME_STATUS_TRUST_FULLY
STATUS_TRUST_MARGINAL =
GPGME_STATUS_TRUST_MARGINAL
STATUS_TRUST_NEVER =
GPGME_STATUS_TRUST_NEVER
STATUS_TRUST_ULTIMATE =
GPGME_STATUS_TRUST_ULTIMATE
STATUS_TRUST_UNDEFINED =
GPGME_STATUS_TRUST_UNDEFINED
STATUS_UNEXPECTED =
GPGME_STATUS_UNEXPECTED
STATUS_USERID_HINT =
GPGME_STATUS_USERID_HINT
STATUS_VALIDSIG =
GPGME_STATUS_VALIDSIG
VALIDITY_FULL =
GPGME_VALIDITY_FULL
VALIDITY_MARGINAL =
GPGME_VALIDITY_MARGINAL
VALIDITY_NEVER =
GPGME_VALIDITY_NEVER
VALIDITY_ULTIMATE =
GPGME_VALIDITY_ULTIMATE
VALIDITY_UNDEFINED =
GPGME_VALIDITY_UNDEFINED
VALIDITY_UNKNOWN =
GPGME_VALIDITY_UNKNOWN
PROTOCOL_NAMES =
{
  PROTOCOL_OpenPGP  => :OpenPGP,
  PROTOCOL_CMS      => :CMS
}
KEYLIST_MODE_NAMES =
{
  KEYLIST_MODE_LOCAL    => :local,
  KEYLIST_MODE_EXTERN   => :extern,
  KEYLIST_MODE_SIGS     => :sigs,
  KEYLIST_MODE_VALIDATE => :validate
}
VALIDITY_NAMES =
{
  VALIDITY_UNKNOWN    => :unknown,
  VALIDITY_UNDEFINED  => :undefined,
  VALIDITY_NEVER      => :never,
  VALIDITY_MARGINAL   => :marginal,
  VALIDITY_FULL       => :full,
  VALIDITY_ULTIMATE   => :ultimate
}
GPG_ERR_SOURCE_UNKNOWN =

rubified gpg-error.h gpg_err_source_t

0
GPG_ERR_SOURCE_GCRYPT =
1
GPG_ERR_SOURCE_GPG =
2
GPG_ERR_SOURCE_GPGSM =
3
GPG_ERR_SOURCE_GPGAGENT =
4
GPG_ERR_SOURCE_PINENTRY =
5
GPG_ERR_SOURCE_SCD =
6
GPG_ERR_SOURCE_GPGME =
7
GPG_ERR_SOURCE_KEYBOX =
8
GPG_ERR_SOURCE_KSBA =
9
GPG_ERR_SOURCE_DIRMNGR =
10
GPG_ERR_SOURCE_GSTI =
11
GPG_ERR_SOURCE_GPA =
12
GPG_ERR_SOURCE_KLEO =
13
GPG_ERR_SOURCE_G13 =
14
GPG_ERR_SOURCE_ANY =
31
GPG_ERR_SOURCE_USER_1 =
32
GPG_ERR_SOURCE_USER_2 =
33
GPG_ERR_SOURCE_USER_3 =
34
GPG_ERR_SOURCE_USER_4 =
35
GPG_ERR_SOURCE_DIM =
128
GPG_ERR_SYSTEM_ERROR =
(1 << 15)
GPG_ERR_NO_ERROR =

gpg_err_code_t

0
GPG_ERR_GENERAL =
1
GPG_ERR_UNKNOWN_PACKET =
2
GPG_ERR_UNKNOWN_VERSION =
3
GPG_ERR_PUBKEY_ALGO =
4
GPG_ERR_DIGEST_ALGO =
5
GPG_ERR_BAD_PUBKEY =
6
GPG_ERR_BAD_SECKEY =
7
GPG_ERR_BAD_SIGNATURE =
8
GPG_ERR_NO_PUBKEY =
9
GPG_ERR_CHECKSUM =
10
GPG_ERR_BAD_PASSPHRASE =
11
GPG_ERR_CIPHER_ALGO =
12
GPG_ERR_KEYRING_OPEN =
13
GPG_ERR_INV_PACKET =
14
GPG_ERR_INV_ARMOR =
15
GPG_ERR_NO_USER_ID =
16
GPG_ERR_NO_SECKEY =
17
GPG_ERR_WRONG_SECKEY =
18
GPG_ERR_BAD_KEY =
19
GPG_ERR_COMPR_ALGO =
20
GPG_ERR_NO_PRIME =
21
GPG_ERR_NO_ENCODING_METHOD =
22
GPG_ERR_NO_ENCRYPTION_SCHEME =
23
GPG_ERR_NO_SIGNATURE_SCHEME =
24
GPG_ERR_INV_ATTR =
25
GPG_ERR_NO_VALUE =
26
GPG_ERR_NOT_FOUND =
27
GPG_ERR_VALUE_NOT_FOUND =
28
GPG_ERR_SYNTAX =
29
GPG_ERR_BAD_MPI =
30
GPG_ERR_INV_PASSPHRASE =
31
GPG_ERR_SIG_CLASS =
32
GPG_ERR_RESOURCE_LIMIT =
33
GPG_ERR_INV_KEYRING =
34
GPG_ERR_TRUSTDB =
35
GPG_ERR_BAD_CERT =
36
GPG_ERR_INV_USER_ID =
37
GPG_ERR_UNEXPECTED =
38
GPG_ERR_TIME_CONFLICT =
39
GPG_ERR_KEYSERVER =
40
GPG_ERR_WRONG_PUBKEY_ALGO =
41
GPG_ERR_TRIBUTE_TO_D_A =
42
GPG_ERR_WEAK_KEY =
43
GPG_ERR_INV_KEYLEN =
44
GPG_ERR_INV_ARG =
45
GPG_ERR_BAD_URI =
46
GPG_ERR_INV_URI =
47
GPG_ERR_NETWORK =
48
GPG_ERR_UNKNOWN_HOST =
49
GPG_ERR_SELFTEST_FAILED =
50
GPG_ERR_NOT_ENCRYPTED =
51
GPG_ERR_NOT_PROCESSED =
52
GPG_ERR_UNUSABLE_PUBKEY =
53
GPG_ERR_UNUSABLE_SECKEY =
54
GPG_ERR_INV_VALUE =
55
GPG_ERR_BAD_CERT_CHAIN =
56
GPG_ERR_MISSING_CERT =
57
GPG_ERR_NO_DATA =
58
GPG_ERR_BUG =
59
GPG_ERR_NOT_SUPPORTED =
60
GPG_ERR_INV_OP =
61
GPG_ERR_TIMEOUT =
62
GPG_ERR_INTERNAL =
63
GPG_ERR_EOF_GCRYPT =
64
GPG_ERR_INV_OBJ =
65
GPG_ERR_TOO_SHORT =
66
GPG_ERR_TOO_LARGE =
67
GPG_ERR_NO_OBJ =
68
GPG_ERR_NOT_IMPLEMENTED =
69
GPG_ERR_CONFLICT =
70
GPG_ERR_INV_CIPHER_MODE =
71
GPG_ERR_INV_FLAG =
72
GPG_ERR_INV_HANDLE =
73
GPG_ERR_TRUNCATED =
74
GPG_ERR_INCOMPLETE_LINE =
75
GPG_ERR_INV_RESPONSE =
76
GPG_ERR_NO_AGENT =
77
GPG_ERR_AGENT =
78
GPG_ERR_INV_DATA =
79
GPG_ERR_ASSUAN_SERVER_FAULT =
80
GPG_ERR_ASSUAN =
81
GPG_ERR_INV_SESSION_KEY =
82
GPG_ERR_INV_SEXP =
83
GPG_ERR_UNSUPPORTED_ALGORITHM =
84
GPG_ERR_NO_PIN_ENTRY =
85
GPG_ERR_PIN_ENTRY =
86
GPG_ERR_BAD_PIN =
87
GPG_ERR_INV_NAME =
88
GPG_ERR_BAD_DATA =
89
GPG_ERR_INV_PARAMETER =
90
GPG_ERR_WRONG_CARD =
91
GPG_ERR_NO_DIRMNGR =
92
GPG_ERR_DIRMNGR =
93
GPG_ERR_CERT_REVOKED =
94
GPG_ERR_NO_CRL_KNOWN =
95
GPG_ERR_CRL_TOO_OLD =
96
GPG_ERR_LINE_TOO_LONG =
97
GPG_ERR_NOT_TRUSTED =
98
GPG_ERR_CANCELED =
99
GPG_ERR_BAD_CA_CERT =
100
GPG_ERR_CERT_EXPIRED =
101
GPG_ERR_CERT_TOO_YOUNG =
102
GPG_ERR_UNSUPPORTED_CERT =
103
GPG_ERR_UNKNOWN_SEXP =
104
GPG_ERR_UNSUPPORTED_PROTECTION =
105
GPG_ERR_CORRUPTED_PROTECTION =
106
GPG_ERR_AMBIGUOUS_NAME =
107
GPG_ERR_CARD =
108
GPG_ERR_CARD_RESET =
109
GPG_ERR_CARD_REMOVED =
110
GPG_ERR_INV_CARD =
111
GPG_ERR_CARD_NOT_PRESENT =
112
GPG_ERR_NO_PKCS15_APP =
113
GPG_ERR_NOT_CONFIRMED =
114
GPG_ERR_CONFIGURATION =
115
GPG_ERR_NO_POLICY_MATCH =
116
GPG_ERR_INV_INDEX =
117
GPG_ERR_INV_ID =
118
GPG_ERR_NO_SCDAEMON =
119
GPG_ERR_SCDAEMON =
120
GPG_ERR_UNSUPPORTED_PROTOCOL =
121
GPG_ERR_BAD_PIN_METHOD =
122
GPG_ERR_CARD_NOT_INITIALIZED =
123
GPG_ERR_UNSUPPORTED_OPERATION =
124
GPG_ERR_WRONG_KEY_USAGE =
125
GPG_ERR_NOTHING_FOUND =
126
GPG_ERR_WRONG_BLOB_TYPE =
127
GPG_ERR_MISSING_VALUE =
128
GPG_ERR_HARDWARE =
129
GPG_ERR_PIN_BLOCKED =
130
GPG_ERR_USE_CONDITIONS =
131
GPG_ERR_PIN_NOT_SYNCED =
132
GPG_ERR_INV_CRL =
133
GPG_ERR_BAD_BER =
134
GPG_ERR_INV_BER =
135
GPG_ERR_ELEMENT_NOT_FOUND =
136
GPG_ERR_IDENTIFIER_NOT_FOUND =
137
GPG_ERR_INV_TAG =
138
GPG_ERR_INV_LENGTH =
139
GPG_ERR_INV_KEYINFO =
140
GPG_ERR_UNEXPECTED_TAG =
141
GPG_ERR_NOT_DER_ENCODED =
142
GPG_ERR_NO_CMS_OBJ =
143
GPG_ERR_INV_CMS_OBJ =
144
GPG_ERR_UNKNOWN_CMS_OBJ =
145
GPG_ERR_UNSUPPORTED_CMS_OBJ =
146
GPG_ERR_UNSUPPORTED_ENCODING =
147
GPG_ERR_UNSUPPORTED_CMS_VERSION =
148
GPG_ERR_UNKNOWN_ALGORITHM =
149
GPG_ERR_INV_ENGINE =
150
GPG_ERR_PUBKEY_NOT_TRUSTED =
151
GPG_ERR_DECRYPT_FAILED =
152
GPG_ERR_KEY_EXPIRED =
153
GPG_ERR_SIG_EXPIRED =
154
GPG_ERR_ENCODING_PROBLEM =
155
GPG_ERR_INV_STATE =
156
GPG_ERR_DUP_VALUE =
157
GPG_ERR_MISSING_ACTION =
158
GPG_ERR_MODULE_NOT_FOUND =
159
GPG_ERR_INV_OID_STRING =
160
GPG_ERR_INV_TIME =
161
GPG_ERR_INV_CRL_OBJ =
162
GPG_ERR_UNSUPPORTED_CRL_VERSION =
163
GPG_ERR_INV_CERT_OBJ =
164
GPG_ERR_UNKNOWN_NAME =
165
GPG_ERR_LOCALE_PROBLEM =
166
GPG_ERR_NOT_LOCKED =
167
GPG_ERR_PROTOCOL_VIOLATION =
168
GPG_ERR_INV_MAC =
169
GPG_ERR_INV_REQUEST =
170
GPG_ERR_UNKNOWN_EXTN =
171
GPG_ERR_UNKNOWN_CRIT_EXTN =
172
GPG_ERR_LOCKED =
173
GPG_ERR_UNKNOWN_OPTION =
174
GPG_ERR_UNKNOWN_COMMAND =
175
GPG_ERR_NOT_OPERATIONAL =
176
GPG_ERR_NO_PASSPHRASE =
177
GPG_ERR_NO_PIN =
178
GPG_ERR_NOT_ENABLED =
179
GPG_ERR_NO_ENGINE =
180
GPG_ERR_MISSING_KEY =
181
GPG_ERR_TOO_MANY =
182
GPG_ERR_LIMIT_REACHED =
183
GPG_ERR_NOT_INITIALIZED =
184
GPG_ERR_MISSING_ISSUER_CERT =
185
GPG_ERR_FULLY_CANCELED =
198
GPG_ERR_UNFINISHED =
199
GPG_ERR_BUFFER_TOO_SHORT =
200
GPG_ERR_SEXP_INV_LEN_SPEC =
201
GPG_ERR_SEXP_STRING_TOO_LONG =
202
GPG_ERR_SEXP_UNMATCHED_PAREN =
203
GPG_ERR_SEXP_NOT_CANONICAL =
204
GPG_ERR_SEXP_BAD_CHARACTER =
205
GPG_ERR_SEXP_BAD_QUOTATION =
206
GPG_ERR_SEXP_ZERO_PREFIX =
207
GPG_ERR_SEXP_NESTED_DH =
208
GPG_ERR_SEXP_UNMATCHED_DH =
209
GPG_ERR_SEXP_UNEXPECTED_PUNC =
210
GPG_ERR_SEXP_BAD_HEX_CHAR =
211
GPG_ERR_SEXP_ODD_HEX_NUMBERS =
212
GPG_ERR_SEXP_BAD_OCT_CHAR =
213
GPG_ERR_ASS_GENERAL =
257
GPG_ERR_ASS_ACCEPT_FAILED =
258
GPG_ERR_ASS_CONNECT_FAILED =
259
GPG_ERR_ASS_INV_RESPONSE =
260
GPG_ERR_ASS_INV_VALUE =
261
GPG_ERR_ASS_INCOMPLETE_LINE =
262
GPG_ERR_ASS_LINE_TOO_LONG =
263
GPG_ERR_ASS_NESTED_COMMANDS =
264
GPG_ERR_ASS_NO_DATA_CB =
265
GPG_ERR_ASS_NO_INQUIRE_CB =
266
GPG_ERR_ASS_NOT_A_SERVER =
267
GPG_ERR_ASS_NOT_A_CLIENT =
268
GPG_ERR_ASS_SERVER_START =
269
GPG_ERR_ASS_READ_ERROR =
270
GPG_ERR_ASS_WRITE_ERROR =
271
GPG_ERR_ASS_TOO_MUCH_DATA =
273
GPG_ERR_ASS_UNEXPECTED_CMD =
274
GPG_ERR_ASS_UNKNOWN_CMD =
275
GPG_ERR_ASS_SYNTAX =
276
GPG_ERR_ASS_CANCELED =
277
GPG_ERR_ASS_NO_INPUT =
278
GPG_ERR_ASS_NO_OUTPUT =
279
GPG_ERR_ASS_PARAMETER =
280
GPG_ERR_ASS_UNKNOWN_INQUIRE =
281
GPG_ERR_USER_1 =
1024
GPG_ERR_USER_2 =
1025
GPG_ERR_USER_3 =
1026
GPG_ERR_USER_4 =
1027
GPG_ERR_USER_5 =
1028
GPG_ERR_USER_6 =
1029
GPG_ERR_USER_7 =
1030
GPG_ERR_USER_8 =
1031
GPG_ERR_USER_9 =
1032
GPG_ERR_USER_10 =
1033
GPG_ERR_USER_11 =
1034
GPG_ERR_USER_12 =
1035
GPG_ERR_USER_13 =
1036
GPG_ERR_USER_14 =
1037
GPG_ERR_USER_15 =
1038
GPG_ERR_USER_16 =
1039
GPG_ERR_MISSING_ERRNO =
16381
GPG_ERR_UNKNOWN_ERRNO =
16382
GPG_ERR_EOF =
16383
GPG_ERR_E2BIG =
GPG_ERR_SYSTEM_ERROR | 0
GPG_ERR_EACCES =
GPG_ERR_SYSTEM_ERROR | 1
GPG_ERR_EADDRINUSE =
GPG_ERR_SYSTEM_ERROR | 2
GPG_ERR_EADDRNOTAVAIL =
GPG_ERR_SYSTEM_ERROR | 3
GPG_ERR_EADV =
GPG_ERR_SYSTEM_ERROR | 4
GPG_ERR_EAFNOSUPPORT =
GPG_ERR_SYSTEM_ERROR | 5
GPG_ERR_EAGAIN =
GPG_ERR_SYSTEM_ERROR | 6
GPG_ERR_EALREADY =
GPG_ERR_SYSTEM_ERROR | 7
GPG_ERR_EAUTH =
GPG_ERR_SYSTEM_ERROR | 8
GPG_ERR_EBACKGROUND =
GPG_ERR_SYSTEM_ERROR | 9
GPG_ERR_EBADE =
GPG_ERR_SYSTEM_ERROR | 10
GPG_ERR_EBADF =
GPG_ERR_SYSTEM_ERROR | 11
GPG_ERR_EBADFD =
GPG_ERR_SYSTEM_ERROR | 12
GPG_ERR_EBADMSG =
GPG_ERR_SYSTEM_ERROR | 13
GPG_ERR_EBADR =
GPG_ERR_SYSTEM_ERROR | 14
GPG_ERR_EBADRPC =
GPG_ERR_SYSTEM_ERROR | 15
GPG_ERR_EBADRQC =
GPG_ERR_SYSTEM_ERROR | 16
GPG_ERR_EBADSLT =
GPG_ERR_SYSTEM_ERROR | 17
GPG_ERR_EBFONT =
GPG_ERR_SYSTEM_ERROR | 18
GPG_ERR_EBUSY =
GPG_ERR_SYSTEM_ERROR | 19
GPG_ERR_ECANCELED =
GPG_ERR_SYSTEM_ERROR | 20
GPG_ERR_ECHILD =
GPG_ERR_SYSTEM_ERROR | 21
GPG_ERR_ECHRNG =
GPG_ERR_SYSTEM_ERROR | 22
GPG_ERR_ECOMM =
GPG_ERR_SYSTEM_ERROR | 23
GPG_ERR_ECONNABORTED =
GPG_ERR_SYSTEM_ERROR | 24
GPG_ERR_ECONNREFUSED =
GPG_ERR_SYSTEM_ERROR | 25
GPG_ERR_ECONNRESET =
GPG_ERR_SYSTEM_ERROR | 26
GPG_ERR_ED =
GPG_ERR_SYSTEM_ERROR | 27
GPG_ERR_EDEADLK =
GPG_ERR_SYSTEM_ERROR | 28
GPG_ERR_EDEADLOCK =
GPG_ERR_SYSTEM_ERROR | 29
GPG_ERR_EDESTADDRREQ =
GPG_ERR_SYSTEM_ERROR | 30
GPG_ERR_EDIED =
GPG_ERR_SYSTEM_ERROR | 31
GPG_ERR_EDOM =
GPG_ERR_SYSTEM_ERROR | 32
GPG_ERR_EDOTDOT =
GPG_ERR_SYSTEM_ERROR | 33
GPG_ERR_EDQUOT =
GPG_ERR_SYSTEM_ERROR | 34
GPG_ERR_EEXIST =
GPG_ERR_SYSTEM_ERROR | 35
GPG_ERR_EFAULT =
GPG_ERR_SYSTEM_ERROR | 36
GPG_ERR_EFBIG =
GPG_ERR_SYSTEM_ERROR | 37
GPG_ERR_EFTYPE =
GPG_ERR_SYSTEM_ERROR | 38
GPG_ERR_EGRATUITOUS =
GPG_ERR_SYSTEM_ERROR | 39
GPG_ERR_EGREGIOUS =
GPG_ERR_SYSTEM_ERROR | 40
GPG_ERR_EHOSTDOWN =
GPG_ERR_SYSTEM_ERROR | 41
GPG_ERR_EHOSTUNREACH =
GPG_ERR_SYSTEM_ERROR | 42
GPG_ERR_EIDRM =
GPG_ERR_SYSTEM_ERROR | 43
GPG_ERR_EIEIO =
GPG_ERR_SYSTEM_ERROR | 44
GPG_ERR_EILSEQ =
GPG_ERR_SYSTEM_ERROR | 45
GPG_ERR_EINPROGRESS =
GPG_ERR_SYSTEM_ERROR | 46
GPG_ERR_EINTR =
GPG_ERR_SYSTEM_ERROR | 47
GPG_ERR_EINVAL =
GPG_ERR_SYSTEM_ERROR | 48
GPG_ERR_EIO =
GPG_ERR_SYSTEM_ERROR | 49
GPG_ERR_EISCONN =
GPG_ERR_SYSTEM_ERROR | 50
GPG_ERR_EISDIR =
GPG_ERR_SYSTEM_ERROR | 51
GPG_ERR_EISNAM =
GPG_ERR_SYSTEM_ERROR | 52
GPG_ERR_EL2HLT =
GPG_ERR_SYSTEM_ERROR | 53
GPG_ERR_EL2NSYNC =
GPG_ERR_SYSTEM_ERROR | 54
GPG_ERR_EL3HLT =
GPG_ERR_SYSTEM_ERROR | 55
GPG_ERR_EL3RST =
GPG_ERR_SYSTEM_ERROR | 56
GPG_ERR_ELIBACC =
GPG_ERR_SYSTEM_ERROR | 57
GPG_ERR_ELIBBAD =
GPG_ERR_SYSTEM_ERROR | 58
GPG_ERR_ELIBEXEC =
GPG_ERR_SYSTEM_ERROR | 59
GPG_ERR_ELIBMAX =
GPG_ERR_SYSTEM_ERROR | 60
GPG_ERR_ELIBSCN =
GPG_ERR_SYSTEM_ERROR | 61
GPG_ERR_ELNRNG =
GPG_ERR_SYSTEM_ERROR | 62
GPG_ERR_ELOOP =
GPG_ERR_SYSTEM_ERROR | 63
GPG_ERR_EMEDIUMTYPE =
GPG_ERR_SYSTEM_ERROR | 64
GPG_ERR_EMFILE =
GPG_ERR_SYSTEM_ERROR | 65
GPG_ERR_SYSTEM_ERROR | 66
GPG_ERR_EMSGSIZE =
GPG_ERR_SYSTEM_ERROR | 67
GPG_ERR_EMULTIHOP =
GPG_ERR_SYSTEM_ERROR | 68
GPG_ERR_ENAMETOOLONG =
GPG_ERR_SYSTEM_ERROR | 69
GPG_ERR_ENAVAIL =
GPG_ERR_SYSTEM_ERROR | 70
GPG_ERR_ENEEDAUTH =
GPG_ERR_SYSTEM_ERROR | 71
GPG_ERR_ENETDOWN =
GPG_ERR_SYSTEM_ERROR | 72
GPG_ERR_ENETRESET =
GPG_ERR_SYSTEM_ERROR | 73
GPG_ERR_ENETUNREACH =
GPG_ERR_SYSTEM_ERROR | 74
GPG_ERR_ENFILE =
GPG_ERR_SYSTEM_ERROR | 75
GPG_ERR_ENOANO =
GPG_ERR_SYSTEM_ERROR | 76
GPG_ERR_ENOBUFS =
GPG_ERR_SYSTEM_ERROR | 77
GPG_ERR_ENOCSI =
GPG_ERR_SYSTEM_ERROR | 78
GPG_ERR_ENODATA =
GPG_ERR_SYSTEM_ERROR | 79
GPG_ERR_ENODEV =
GPG_ERR_SYSTEM_ERROR | 80
GPG_ERR_ENOENT =
GPG_ERR_SYSTEM_ERROR | 81
GPG_ERR_ENOEXEC =
GPG_ERR_SYSTEM_ERROR | 82
GPG_ERR_ENOLCK =
GPG_ERR_SYSTEM_ERROR | 83
GPG_ERR_SYSTEM_ERROR | 84
GPG_ERR_ENOMEDIUM =
GPG_ERR_SYSTEM_ERROR | 85
GPG_ERR_ENOMEM =
GPG_ERR_SYSTEM_ERROR | 86
GPG_ERR_ENOMSG =
GPG_ERR_SYSTEM_ERROR | 87
GPG_ERR_ENONET =
GPG_ERR_SYSTEM_ERROR | 88
GPG_ERR_ENOPKG =
GPG_ERR_SYSTEM_ERROR | 89
GPG_ERR_ENOPROTOOPT =
GPG_ERR_SYSTEM_ERROR | 90
GPG_ERR_ENOSPC =
GPG_ERR_SYSTEM_ERROR | 91
GPG_ERR_ENOSR =
GPG_ERR_SYSTEM_ERROR | 92
GPG_ERR_ENOSTR =
GPG_ERR_SYSTEM_ERROR | 93
GPG_ERR_ENOSYS =
GPG_ERR_SYSTEM_ERROR | 94
GPG_ERR_ENOTBLK =
GPG_ERR_SYSTEM_ERROR | 95
GPG_ERR_ENOTCONN =
GPG_ERR_SYSTEM_ERROR | 96
GPG_ERR_ENOTDIR =
GPG_ERR_SYSTEM_ERROR | 97
GPG_ERR_ENOTEMPTY =
GPG_ERR_SYSTEM_ERROR | 98
GPG_ERR_ENOTNAM =
GPG_ERR_SYSTEM_ERROR | 99
GPG_ERR_ENOTSOCK =
GPG_ERR_SYSTEM_ERROR | 100
GPG_ERR_ENOTSUP =
GPG_ERR_SYSTEM_ERROR | 101
GPG_ERR_ENOTTY =
GPG_ERR_SYSTEM_ERROR | 102
GPG_ERR_ENOTUNIQ =
GPG_ERR_SYSTEM_ERROR | 103
GPG_ERR_ENXIO =
GPG_ERR_SYSTEM_ERROR | 104
GPG_ERR_EOPNOTSUPP =
GPG_ERR_SYSTEM_ERROR | 105
GPG_ERR_EOVERFLOW =
GPG_ERR_SYSTEM_ERROR | 106
GPG_ERR_EPERM =
GPG_ERR_SYSTEM_ERROR | 107
GPG_ERR_EPFNOSUPPORT =
GPG_ERR_SYSTEM_ERROR | 108
GPG_ERR_EPIPE =
GPG_ERR_SYSTEM_ERROR | 109
GPG_ERR_EPROCLIM =
GPG_ERR_SYSTEM_ERROR | 110
GPG_ERR_EPROCUNAVAIL =
GPG_ERR_SYSTEM_ERROR | 111
GPG_ERR_EPROGMISMATCH =
GPG_ERR_SYSTEM_ERROR | 112
GPG_ERR_EPROGUNAVAIL =
GPG_ERR_SYSTEM_ERROR | 113
GPG_ERR_EPROTO =
GPG_ERR_SYSTEM_ERROR | 114
GPG_ERR_EPROTONOSUPPORT =
GPG_ERR_SYSTEM_ERROR | 115
GPG_ERR_EPROTOTYPE =
GPG_ERR_SYSTEM_ERROR | 116
GPG_ERR_ERANGE =
GPG_ERR_SYSTEM_ERROR | 117
GPG_ERR_EREMCHG =
GPG_ERR_SYSTEM_ERROR | 118
GPG_ERR_EREMOTE =
GPG_ERR_SYSTEM_ERROR | 119
GPG_ERR_EREMOTEIO =
GPG_ERR_SYSTEM_ERROR | 120
GPG_ERR_ERESTART =
GPG_ERR_SYSTEM_ERROR | 121
GPG_ERR_EROFS =
GPG_ERR_SYSTEM_ERROR | 122
GPG_ERR_ERPCMISMATCH =
GPG_ERR_SYSTEM_ERROR | 123
GPG_ERR_ESHUTDOWN =
GPG_ERR_SYSTEM_ERROR | 124
GPG_ERR_ESOCKTNOSUPPORT =
GPG_ERR_SYSTEM_ERROR | 125
GPG_ERR_ESPIPE =
GPG_ERR_SYSTEM_ERROR | 126
GPG_ERR_ESRCH =
GPG_ERR_SYSTEM_ERROR | 127
GPG_ERR_ESRMNT =
GPG_ERR_SYSTEM_ERROR | 128
GPG_ERR_ESTALE =
GPG_ERR_SYSTEM_ERROR | 129
GPG_ERR_ESTRPIPE =
GPG_ERR_SYSTEM_ERROR | 130
GPG_ERR_ETIME =
GPG_ERR_SYSTEM_ERROR | 131
GPG_ERR_ETIMEDOUT =
GPG_ERR_SYSTEM_ERROR | 132
GPG_ERR_ETOOMANYREFS =
GPG_ERR_SYSTEM_ERROR | 133
GPG_ERR_ETXTBSY =
GPG_ERR_SYSTEM_ERROR | 134
GPG_ERR_EUCLEAN =
GPG_ERR_SYSTEM_ERROR | 135
GPG_ERR_EUNATCH =
GPG_ERR_SYSTEM_ERROR | 136
GPG_ERR_EUSERS =
GPG_ERR_SYSTEM_ERROR | 137
GPG_ERR_EWOULDBLOCK =
GPG_ERR_SYSTEM_ERROR | 138
GPG_ERR_EXDEV =
GPG_ERR_SYSTEM_ERROR | 139
GPG_ERR_EXFULL =
GPG_ERR_SYSTEM_ERROR | 140
GPG_ERR_CODE_DIM =
65536
GPG_ERR_CODE_MASK =
(GPG_ERR_CODE_DIM - 1)
GPG_ERR_SOURCE_MASK =
(GPG_ERR_SOURCE_DIM - 1)
GPG_ERR_SOURCE_SHIFT =
24
GPG_ERR_INITIALIZED =
1
GPG_ERR_SOURCE_DEFAULT =
GPG_ERR_SOURCE_UNKNOWN
GPGME_VERSION =

rubified gpgme.h

"1.3.1"
GPGME_ERR_SOURCE_DEFAULT =
GPG_ERR_SOURCE_USER_1
GPGME_DATA_ENCODING_NONE =

gpgme_data_encoding_t

0
GPGME_DATA_ENCODING_BINARY =
1
GPGME_DATA_ENCODING_BASE64 =
2
GPGME_DATA_ENCODING_ARMOR =
3
GPGME_DATA_ENCODING_URL =
4
GPGME_DATA_ENCODING_URLESC =
5
GPGME_DATA_ENCODING_URL0 =
6
GPGME_PK_RSA =

gpgme_pubkey_algo_t

1
GPGME_PK_RSA_E =
2
GPGME_PK_RSA_S =
3
GPGME_PK_ELG_E =
16
GPGME_PK_DSA =
17
GPGME_PK_ELG =
20
GPGME_PK_ECDSA =
301
GPGME_PK_ECDH =
302
GPGME_MD_NONE =

gpgme_hash_algo_t

0
GPGME_MD_MD5 =
1
GPGME_MD_SHA1 =
2
GPGME_MD_RMD160 =
3
GPGME_MD_MD2 =
5
GPGME_MD_TIGER =
6
GPGME_MD_HAVAL =
7
GPGME_MD_SHA256 =
8
GPGME_MD_SHA384 =
9
GPGME_MD_SHA512 =
10
GPGME_MD_MD4 =
301
GPGME_MD_CRC32 =
302
GPGME_MD_CRC32_RFC1510 =
303
GPGME_MD_CRC24_RFC2440 =
304
GPGME_SIG_STAT_NONE =

_gpgme_sig_stat_t

0
GPGME_SIG_STAT_GOOD =
1
GPGME_SIG_STAT_BAD =
2
GPGME_SIG_STAT_NOKEY =
3
GPGME_SIG_STAT_NOSIG =
4
GPGME_SIG_STAT_ERROR =
5
GPGME_SIG_STAT_DIFF =
6
GPGME_SIG_STAT_GOOD_EXP =
7
GPGME_SIG_STAT_GOOD_EXPKEY =
8
GPGME_SIG_MODE_NORMAL =

gpgme_sig_mode_t

0
GPGME_SIG_MODE_DETACH =
1
GPGME_SIG_MODE_CLEAR =
2
GPGME_ATTR_KEYID =

_gpgme_attr_t

1
GPGME_ATTR_FPR =
2
GPGME_ATTR_ALGO =
3
GPGME_ATTR_LEN =
4
GPGME_ATTR_CREATED =
5
GPGME_ATTR_EXPIRE =
6
GPGME_ATTR_OTRUST =
7
GPGME_ATTR_USERID =
8
GPGME_ATTR_NAME =
9
GPGME_ATTR_EMAIL =
10
GPGME_ATTR_COMMENT =
11
GPGME_ATTR_VALIDITY =
12
GPGME_ATTR_LEVEL =
13
GPGME_ATTR_TYPE =
14
GPGME_ATTR_IS_SECRET =
15
GPGME_ATTR_KEY_REVOKED =
16
GPGME_ATTR_KEY_INVALID =
17
GPGME_ATTR_UID_REVOKED =
18
GPGME_ATTR_UID_INVALID =
19
GPGME_ATTR_KEY_CAPS =
20
GPGME_ATTR_CAN_ENCRYPT =
21
GPGME_ATTR_CAN_SIGN =
22
GPGME_ATTR_CAN_CERTIFY =
23
GPGME_ATTR_KEY_EXPIRED =
24
GPGME_ATTR_KEY_DISABLED =
25
GPGME_ATTR_SERIAL =
26
GPGME_ATTR_ISSUER =
27
GPGME_ATTR_CHAINID =
28
GPGME_ATTR_SIG_STATUS =
29
GPGME_ATTR_ERRTOK =
30
GPGME_ATTR_SIG_SUMMARY =
31
GPGME_ATTR_SIG_CLASS =
32
GPGME_VALIDITY_UNKNOWN =

gpgme_validity_t

0
GPGME_VALIDITY_UNDEFINED =
1
GPGME_VALIDITY_NEVER =
2
GPGME_VALIDITY_MARGINAL =
3
GPGME_VALIDITY_FULL =
4
GPGME_VALIDITY_ULTIMATE =
5
GPGME_PROTOCOL_OpenPGP =

gpgme_protocol_t

0
GPGME_PROTOCOL_CMS =
1
GPGME_PROTOCOL_GPGCONF =
2
GPGME_PROTOCOL_ASSUAN =
3
GPGME_PROTOCOL_G13 =
4
GPGME_PROTOCOL_UISERVER =
5
GPGME_PROTOCOL_DEFAULT =
254
GPGME_PROTOCOL_UNKNOWN =
255
GPGME_KEYLIST_MODE_LOCAL =
1
GPGME_KEYLIST_MODE_EXTERN =
2
GPGME_KEYLIST_MODE_SIGS =
4
GPGME_KEYLIST_MODE_SIG_NOTATIONS =
8
GPGME_KEYLIST_MODE_EPHEMERAL =
128
GPGME_KEYLIST_MODE_VALIDATE =
256
GPGME_EXPORT_MODE_EXTERN =
2
GPGME_EXPORT_MODE_MINIMAL =
4
GPGME_AUDITLOG_HTML =
1
GPGME_AUDITLOG_WITH_HELP =
128
GPGME_SIG_NOTATION_HUMAN_READABLE =
1
GPGME_SIG_NOTATION_CRITICAL =
2
GPGME_STATUS_EOF =

gpgme_status_code_t

0
GPGME_STATUS_ENTER =
1
GPGME_STATUS_LEAVE =
2
GPGME_STATUS_ABORT =
3
GPGME_STATUS_GOODSIG =
4
GPGME_STATUS_BADSIG =
5
GPGME_STATUS_ERRSIG =
6
GPGME_STATUS_BADARMOR =
7
GPGME_STATUS_RSA_OR_IDEA =
8
GPGME_STATUS_KEYEXPIRED =
9
GPGME_STATUS_KEYREVOKED =
10
GPGME_STATUS_TRUST_UNDEFINED =
11
GPGME_STATUS_TRUST_NEVER =
12
GPGME_STATUS_TRUST_MARGINAL =
13
GPGME_STATUS_TRUST_FULLY =
14
GPGME_STATUS_TRUST_ULTIMATE =
15
GPGME_STATUS_SHM_INFO =
16
GPGME_STATUS_SHM_GET =
17
GPGME_STATUS_SHM_GET_BOOL =
18
GPGME_STATUS_SHM_GET_HIDDEN =
19
GPGME_STATUS_NEED_PASSPHRASE =
20
GPGME_STATUS_VALIDSIG =
21
GPGME_STATUS_SIG_ID =
22
GPGME_STATUS_ENC_TO =
23
GPGME_STATUS_NODATA =
24
GPGME_STATUS_BAD_PASSPHRASE =
25
GPGME_STATUS_NO_PUBKEY =
26
GPGME_STATUS_NO_SECKEY =
27
GPGME_STATUS_NEED_PASSPHRASE_SYM =
28
GPGME_STATUS_DECRYPTION_FAILED =
29
GPGME_STATUS_DECRYPTION_OKAY =
30
GPGME_STATUS_MISSING_PASSPHRASE =
31
GPGME_STATUS_GOOD_PASSPHRASE =
32
GPGME_STATUS_GOODMDC =
33
GPGME_STATUS_BADMDC =
34
GPGME_STATUS_ERRMDC =
35
GPGME_STATUS_IMPORTED =
36
GPGME_STATUS_IMPORT_OK =
37
GPGME_STATUS_IMPORT_PROBLEM =
38
GPGME_STATUS_IMPORT_RES =
39
GPGME_STATUS_FILE_START =
40
GPGME_STATUS_FILE_DONE =
41
GPGME_STATUS_FILE_ERROR =
42
GPGME_STATUS_BEGIN_DECRYPTION =
43
GPGME_STATUS_END_DECRYPTION =
44
GPGME_STATUS_BEGIN_ENCRYPTION =
45
GPGME_STATUS_END_ENCRYPTION =
46
GPGME_STATUS_DELETE_PROBLEM =
47
GPGME_STATUS_GET_BOOL =
48
GPGME_STATUS_GET_LINE =
49
GPGME_STATUS_GET_HIDDEN =
50
GPGME_STATUS_GOT_IT =
51
GPGME_STATUS_PROGRESS =
52
GPGME_STATUS_SIG_CREATED =
53
GPGME_STATUS_SESSION_KEY =
54
GPGME_STATUS_NOTATION_NAME =
55
GPGME_STATUS_NOTATION_DATA =
56
GPGME_STATUS_POLICY_URL =
57
GPGME_STATUS_BEGIN_STREAM =
58
GPGME_STATUS_END_STREAM =
59
GPGME_STATUS_KEY_CREATED =
60
GPGME_STATUS_USERID_HINT =
61
GPGME_STATUS_UNEXPECTED =
62
GPGME_STATUS_INV_RECP =
63
GPGME_STATUS_NO_RECP =
64
GPGME_STATUS_ALREADY_SIGNED =
65
GPGME_STATUS_SIGEXPIRED =
66
GPGME_STATUS_EXPSIG =
67
GPGME_STATUS_EXPKEYSIG =
68
GPGME_STATUS_TRUNCATED =
69
GPGME_STATUS_ERROR =
70
GPGME_STATUS_NEWSIG =
71
GPGME_STATUS_REVKEYSIG =
72
GPGME_STATUS_SIG_SUBPACKET =
73
GPGME_STATUS_NEED_PASSPHRASE_PIN =
74
GPGME_STATUS_SC_OP_FAILURE =
75
GPGME_STATUS_SC_OP_SUCCESS =
76
GPGME_STATUS_CARDCTRL =
77
GPGME_STATUS_BACKUP_KEY_CREATED =
78
GPGME_STATUS_PKA_TRUST_BAD =
79
GPGME_STATUS_PKA_TRUST_GOOD =
80
GPGME_STATUS_PLAINTEXT =
81
GPGME_STATUS_INV_SGNR =
82
GPGME_STATUS_NO_SGNR =
83
GPGME_STATUS_SUCCESS =
84
GPGME_INCLUDE_CERTS_DEFAULT =
-256
# gpgme_event_io_t
GPGME_EVENT_START =

gpgme_event_io_t

0
GPGME_EVENT_DONE =
GPGME_EVENT_START + 1
GPGME_EVENT_NEXT_KEY =
GPGME_EVENT_DONE + 1
GPGME_EVENT_NEXT_TRUSTITEM =
GPGME_EVENT_NEXT_KEY + 1
GPGME_ENCRYPT_ALWAYS_TRUST =

gpgme_encrypt_flags_t

1
GPGME_ENCRYPT_NO_ENCRYPT_TO =
2
GPGME_ENCRYPT_PREPARE =
4
GPGME_ENCRYPT_EXPECT_SIGN =
8
GPGME_SIGSUM_VALID =

gpgme_sigsum_t

0x0001
GPGME_SIGSUM_GREEN =
0x0002
GPGME_SIGSUM_RED =
0x0004
GPGME_SIGSUM_KEY_REVOKED =
0x0010
GPGME_SIGSUM_KEY_EXPIRED =
0x0020
GPGME_SIGSUM_SIG_EXPIRED =
0x0040
GPGME_SIGSUM_KEY_MISSING =
0x0080
GPGME_SIGSUM_CRL_MISSING =
0x0100
GPGME_SIGSUM_CRL_TOO_OLD =
0x0200
GPGME_SIGSUM_BAD_POLICY =
0x0400
GPGME_SIGSUM_SYS_ERROR =
0x0800
GPGME_IMPORT_NEW =
1
GPGME_IMPORT_UID =
2
GPGME_IMPORT_SIG =
4
GPGME_IMPORT_SUBKEY =
8
GPGME_IMPORT_SECRET =
16
GPGME_CONF_BASIC =

gpgme_conf_level_t

0
GPGME_CONF_ADVANCED =
1
GPGME_CONF_EXPERT =
2
GPGME_CONF_INVISIBLE =
3
GPGME_CONF_INTERNAL =
4
GPGME_CONF_NONE =

gpgme_conf_type_t

0
GPGME_CONF_STRING =
1
GPGME_CONF_INT32 =
2
GPGME_CONF_UINT32 =
3
GPGME_CONF_FILENAME =
32
GPGME_CONF_LDAP_SERVER =
33
GPGME_CONF_KEY_FPR =
34
GPGME_CONF_PUB_KEY =
35
GPGME_CONF_SEC_KEY =
36
GPGME_CONF_ALIAS_LIST =
37
GPGME_CONF_PATHNAME =
GPGME_CONF_FILENAME
GPGME_CONF_GROUP =
(1 << 0)
GPGME_CONF_OPTIONAL =
(1 << 1)
GPGME_CONF_LIST =
(1 << 2)
GPGME_CONF_RUNTIME =
(1 << 3)
GPGME_CONF_DEFAULT =
(1 << 4)
GPGME_CONF_DEFAULT_DESC =
(1 << 5)
GPGME_CONF_NO_ARG_DESC =
(1 << 6)
GPGME_CONF_NO_CHANGE =
(1 << 7)

Class Method Summary collapse

Class Method Details

.check_version(options = nil) ⇒ Object

TODO find out what it does, can’t seem to find a proper parameter that returns something other than nil.



93
94
95
96
97
98
99
100
101
102
103
# File 'lib/gpgme.rb', line 93

def check_version(options = nil)
  version = nil
  if options.kind_of?(String)
    version = options
  elsif options.include?(:version)
    version = options[:version]
  end
  unless GPGME::gpgme_check_version(version)
    raise Error::InvalidVersion.new
  end
end

.error_to_exception(err) ⇒ Object

Auxiliary method used by all the library to generate exceptions from error codes returned by the C extension.



31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
# File 'lib/gpgme.rb', line 31

def error_to_exception(err)
  case GPGME::gpgme_err_code(err)
  when GPG_ERR_EOF
    EOFError.new
  when GPG_ERR_NO_ERROR
    nil
  when GPG_ERR_GENERAL
    Error::General.new(err)
  when GPG_ERR_ENOMEM
    Errno::ENOMEM.new
  when GPG_ERR_INV_VALUE
    Error::InvalidValue.new(err)
  when GPG_ERR_UNUSABLE_PUBKEY
    Error::UnusablePublicKey.new(err)
  when GPG_ERR_UNUSABLE_SECKEY
    Error::UnusableSecretKey.new(err)
  when GPG_ERR_NO_DATA
    Error::NoData.new(err)
  when GPG_ERR_CONFLICT
    Error::Conflict.new(err)
  when GPG_ERR_NOT_IMPLEMENTED
    Error::NotImplemented.new(err)
  when GPG_ERR_DECRYPT_FAILED
    Error::DecryptFailed.new(err)
  when GPG_ERR_BAD_PASSPHRASE
    Error::BadPassphrase.new(err)
  when GPG_ERR_CANCELED
    Error::Canceled.new(err)
  when GPG_ERR_INV_ENGINE
    Error::InvalidEngine.new(err)
  when GPG_ERR_AMBIGUOUS_NAME
    Error::AmbiguousName.new(err)
  when GPG_ERR_WRONG_KEY_USAGE
    Error::WrongKeyUsage.new(err)
  when GPG_ERR_CERT_REVOKED
    Error::CertificateRevoked.new(err)
  when GPG_ERR_CERT_EXPIRED
    Error::CertificateExpired.new(err)
  when GPG_ERR_NO_CRL_KNOWN
    Error::NoCRLKnown.new(err)
  when GPG_ERR_NO_POLICY_MATCH
    Error::NoPolicyMatch.new(err)
  when GPG_ERR_NO_SECKEY
    Error::NoSecretKey.new(err)
  when GPG_ERR_MISSING_CERT
    Error::MissingCertificate.new(err)
  when GPG_ERR_BAD_CERT_CHAIN
    Error::BadCertificateChain.new(err)
  when GPG_ERR_UNSUPPORTED_ALGORITHM
    Error::UnsupportedAlgorithm.new(err)
  when GPG_ERR_BAD_SIGNATURE
    Error::BadSignature.new(err)
  when GPG_ERR_NO_PUBKEY
    Error::NoPublicKey.new(err)
  else
    Error.new(err)
  end
end

.gpgme_check_version(required) ⇒ Object



60
61
62
# File 'lib/gpgme/ffi/functions.rb', line 60

def self.gpgme_check_version(required)
  Library.gpgme_check_version_internal required, Library::Signature.offset_of(:validity)
end

.gpgme_data_new(rdata) ⇒ Object



103
104
105
106
107
108
109
110
111
112
# File 'lib/gpgme/ffi/functions.rb', line 103

def self.gpgme_data_new(rdata)
  buf = FFI::Buffer.new :pointer, 1
  err = Library.gpgme_data_new buf

  if gpgme_err_code(err) == GPG_ERR_NO_ERROR
    rdata << Data.new_from_struct(buf.read_pointer)
  end

  err
end

.gpgme_data_new_from_cbs(rdata, ruby_cbs, ruby_handle) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# File 'lib/gpgme/ffi/functions.rb', line 142

def self.gpgme_data_new_from_cbs(rdata, ruby_cbs, ruby_handle)
  buf = FFI::Buffer.new :pointer, 1
  cbs = Library::Callbacks.new

  cbs[:read] = FFI::Function.new(:ssize_t, [ :pointer, :pointer, :size_t ]) do |handle, buffer, size|
    data = ruby_cbs.read ruby_handle, size

    if data.nil?
      0
    else

      buffer.put_bytes 0, data, 0, data.length

      data.length
    end
  end

  cbs[:write] = FFI::Function.new(:ssize_t, [ :pointer, :pointer, :size_t ]) do |handle, buffer, size|
    data = buffer.get_bytes 0, size

    ruby_cbs.write ruby_handle, data, size
  end

  cbs[:seek] = FFI::Function.new(:off_t, [ :pointer, :off_t, :int ]) do |handle, offset, whence|
    ruby_cbs.seek ruby_handle, offset, whence
  end

  cbs[:release] = FFI::Pointer::NULL

  err = Library.gpgme_data_new_from_cbs buf, cbs.to_ptr, FFI::Pointer::NULL
  if gpgme_err_code(err) == GPG_ERR_NO_ERROR
    rdata << Data.new_from_struct(buf.read_pointer, cbs)
  end

  err
end

.gpgme_data_new_from_fd(rdata, fd) ⇒ Object

Raises:

  • (NotImplementedError)


126
127
128
# File 'lib/gpgme/ffi/functions.rb', line 126

def self.gpgme_data_new_from_fd(rdata, fd)
  raise NotImplementedError, "GPGME::gpgme_data_new_from_fd cannot be used on JRuby due to NIO API limitations."
end

.gpgme_data_new_from_mem(rdata, buffer, size) ⇒ Object



114
115
116
117
118
119
120
121
122
123
# File 'lib/gpgme/ffi/functions.rb', line 114

def self.gpgme_data_new_from_mem(rdata, buffer, size)
  buf = FFI::Buffer.new :pointer, 1
  err = Library.gpgme_data_new_from_mem buf, buffer, size, 1

  if gpgme_err_code(err) == GPG_ERR_NO_ERROR
    rdata << Data.new_from_struct(buf.read_pointer)
  end

  err
end

.gpgme_data_read(data, length) ⇒ Object



179
180
181
182
183
184
185
186
187
188
189
190
191
# File 'lib/gpgme/ffi/functions.rb', line 179

def self.gpgme_data_read(data, length)
  buf = FFI::Buffer.new(:uint8, (length > 0) ? length : 1)

  bytes = Library.gpgme_data_read data.context_pointer, buf, length

  if bytes == -1
    raise "gpgme_data_read failed with error #{FFI.errno}"
  end

  return nil if bytes == 0

  buf.get_bytes 0, bytes
end

.gpgme_data_rewind(dh) ⇒ Object



31
32
33
34
35
36
37
# File 'lib/gpgme/compat.rb', line 31

def gpgme_data_rewind(dh)
  begin
    GPGME::gpgme_data_seek(dh, 0, IO::SEEK_SET)
  rescue SystemCallError => e
    return e.errno
  end
end

.gpgme_data_seek(data, offset, whence) ⇒ Object



208
209
210
211
212
213
214
215
216
# File 'lib/gpgme/ffi/functions.rb', line 208

def self.gpgme_data_seek(data, offset, whence)
  pos = Library.gpgme_data_seek data.context_pointer, offset, whence

  if pos == -1
    raise "gpgme_data_seek failed with error #{FFI.errno}"
  end

  pos
end

.gpgme_data_write(data, buffer, length) ⇒ Object



193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/gpgme/ffi/functions.rb', line 193

def self.gpgme_data_write(data, buffer, length)
  buf = FFI::Buffer.new(:uint8, (length > 0) ? length : 1)
  if length > 0
    buf.put_bytes 0, buffer, 0, length
  end

  bytes = Library.gpgme_data_write data.context_pointer, buf, length

  if bytes == -1
    raise "gpgme_data_write failed with error #{FFI.errno}"
  end

  bytes
end

.gpgme_err_code(code) ⇒ Object



83
84
85
# File 'lib/gpgme/ffi/functions.rb', line 83

def self.gpgme_err_code(code)
  code & GPG_ERR_CODE_MASK
end

.gpgme_err_make(source, code) ⇒ Object



91
92
93
94
95
96
97
# File 'lib/gpgme/ffi/functions.rb', line 91

def self.gpgme_err_make(source, code)
  if code == GPG_ERR_NO_ERROR
    return GPG_ERR_NO_ERROR
  end

  ((source << GPG_ERR_SOURCE_SHIFT) & GPG_ERR_SOURCE_MASK) | (code & GPG_ERR_CODE_MASK)
end

.gpgme_err_source(code) ⇒ Object



87
88
89
# File 'lib/gpgme/ffi/functions.rb', line 87

def self.gpgme_err_source(code)
  (code & GPG_ERR_SOURCE_MASK) >> GPG_ERR_SOURCE_SHIFT
end

.gpgme_get_engine_info(rinfo) ⇒ Object



64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/gpgme/ffi/functions.rb', line 64

def self.gpgme_get_engine_info(rinfo)
  engine_info = Library::EngineInfo.new
  err = Library.gpgme_get_engine_info engine_info.to_ptr

  return err if gpgme_err_code(err) != GPG_ERR_NO_ERROR

  ptr = engine_info.to_ptr
  until ptr.null?
    engine = Library::EngineInfo.new ptr

    rinfo << EngineInfo.new_from_struct(engine)

    ptr = engine[:next]
  end

  err
end

.gpgme_get_key(context, fingerprint, rkey, secret) ⇒ Object



287
288
289
290
291
292
293
294
295
296
297
# File 'lib/gpgme/ffi/functions.rb', line 287

def self.gpgme_get_key(context, fingerprint, rkey, secret)
  key = FFI::Buffer.new :pointer, 1

  ret = Library.gpgme_get_key context.context_pointer, fingerprint, key, secret

  if gpgme_err_code(ret) == GPG_ERR_NO_ERROR
    rkey << Key.new_from_struct(key.read_pointer)
  end

  ret
end

.gpgme_get_passphrase_cb(context, rruby_callback, rruby_hook_value) ⇒ Object



247
248
249
250
251
252
253
254
# File 'lib/gpgme/ffi/functions.rb', line 247

def self.gpgme_get_passphrase_cb(context, rruby_callback, rruby_hook_value)
  ruby_callback, ruby_hook_value, ffi_wrapper = context.context_passphrase_callback

  rruby_callback << ruby_callback
  rruby_hook_value << ruby_hook_value

  nil
end

.gpgme_get_progress_cb(context, rruby_callback, rruby_hook_value) ⇒ Object



266
267
268
269
270
271
272
273
# File 'lib/gpgme/ffi/functions.rb', line 266

def self.gpgme_get_progress_cb(context, rruby_callback, rruby_hook_value)
  ruby_callback, ruby_hook_value, ffi_wrapper = context.context_progress_callback

  rruby_callback << ruby_callback
  rruby_hook_value << ruby_hook_value

  nil
end

.gpgme_new(rctx) ⇒ Object



218
219
220
221
222
223
224
225
226
227
# File 'lib/gpgme/ffi/functions.rb', line 218

def self.gpgme_new(rctx)
  buf = FFI::Buffer.new :pointer, 1
  err = Library.gpgme_new buf

  if gpgme_err_code(err) == GPG_ERR_NO_ERROR
    rctx << Ctx.new_from_struct(buf.read_pointer)
  end

  err
end

.gpgme_op_decrypt_result(context) ⇒ Object



318
319
320
321
322
# File 'lib/gpgme/ffi/functions.rb', line 318

def self.gpgme_op_decrypt_result(context)
  struct = Library::DecryptResult.new Library::gpgme_op_decrypt_result(context.context_pointer)

  DecryptResult.new_from_struct struct
end

.gpgme_op_encrypt_result(context) ⇒ Object



347
348
349
350
351
# File 'lib/gpgme/ffi/functions.rb', line 347

def self.gpgme_op_encrypt_result(context)
  struct = Library::EncryptResult.new Library::gpgme_op_encrypt_result(context.context_pointer)

  EncryptResult.new_from_struct struct
end

.gpgme_op_import_ext(ctx, keydata, nr) ⇒ Object



40
41
42
43
44
45
46
# File 'lib/gpgme/compat.rb', line 40

def gpgme_op_import_ext(ctx, keydata, nr)
  err = GPGME::gpgme_op_import(ctx, keydata)
  if GPGME::gpgme_err_code(err) == GPGME::GPG_ERR_NO_ERROR
    result = GPGME::gpgme_op_import_result(ctx)
    nr.push(result.considered)
  end
end

.gpgme_op_import_result(context) ⇒ Object



299
300
301
302
303
# File 'lib/gpgme/ffi/functions.rb', line 299

def self.gpgme_op_import_result(context)
  result = Library::ImportResult.new Library.gpgme_op_import_result(context.context_pointer)

  ImportResult.new_from_struct result
end

.gpgme_op_keylist_next(context, rkey) ⇒ Object



275
276
277
278
279
280
281
282
283
284
285
# File 'lib/gpgme/ffi/functions.rb', line 275

def self.gpgme_op_keylist_next(context, rkey)
  key = FFI::Buffer.new :pointer, 1

  ret = Library.gpgme_op_keylist_next context.context_pointer, key

  if gpgme_err_code(ret) == GPG_ERR_NO_ERROR
    rkey << Key.new_from_struct(key.read_pointer)
  end

  ret
end

.gpgme_op_sign_result(context) ⇒ Object



340
341
342
343
344
# File 'lib/gpgme/ffi/functions.rb', line 340

def self.gpgme_op_sign_result(context)
  struct = Library::SignResult.new Library::gpgme_op_sign_result(context.context_pointer)

  SignResult.new_from_struct struct
end

.gpgme_op_trustlist_next(context, ritem) ⇒ Object



306
307
308
309
310
311
312
313
314
315
316
# File 'lib/gpgme/ffi/functions.rb', line 306

def self.gpgme_op_trustlist_next(context, ritem)
  buf = FFI::Buffer.new :pointer, 1

  err = Library.gpgme_op_trustlist_next context, buf

  if gpgme_err_code(err) == GPG_ERR_NO_ERROR
    ritem << TrustItem.new_from_struct(buf.read_pointer)
  end

  err
end

.gpgme_op_verify_result(context) ⇒ Object



325
326
327
328
329
# File 'lib/gpgme/ffi/functions.rb', line 325

def self.gpgme_op_verify_result(context)
  struct = Library::VerifyResult.new Library::gpgme_op_verify_result(context.context_pointer)

  VerifyResult.new_from_struct struct
end

.gpgme_release(ctx) ⇒ Object



229
230
231
232
233
# File 'lib/gpgme/ffi/functions.rb', line 229

def self.gpgme_release(ctx)
  ctx.release_pointer

  nil
end

.gpgme_set_passphrase_cb(context, ruby_callback, ruby_hook_value) ⇒ Object



235
236
237
238
239
240
241
242
243
244
245
# File 'lib/gpgme/ffi/functions.rb', line 235

def self.gpgme_set_passphrase_cb(context, ruby_callback, ruby_hook_value)
  callback = FFI::Function.new(:uint, [ :pointer, :string, :string, :int, :int ]) do |hook, uid_hint, passphrase_info, prev_was_bad, fd|
    ruby_callback.call ruby_hook_value, uid_hint, passphrase_info, prev_was_bad, fd

    gpgme_err_make GPG_ERR_SOURCE_USER_1, GPG_ERR_NO_ERROR
  end

  context.context_passphrase_callback = [ ruby_callback, ruby_hook_value, callback ]

  Library.gpgme_set_passphrase_cb context.context_pointer, callback, FFI::Pointer::NULL
end

.gpgme_set_progress_cb(context, ruby_callback, ruby_hook_value) ⇒ Object



256
257
258
259
260
261
262
263
264
# File 'lib/gpgme/ffi/functions.rb', line 256

def self.gpgme_set_progress_cb(context, ruby_callback, ruby_hook_value)
  callback = FFI::Function.new(:void, [ :pointer, :string, :int, :int, :int ]) do |hook, what, type, current, total|
    ruby_callback.call ruby_hook_value, what, type, current, total
  end

  context.context_progress_callback = [ ruby_callback, ruby_hook_value, callback ]

  Library.gpgme_set_progress_cb context.context_pointer, callback, FFI::Pointer::NULL
end

.gpgme_signers_enum(context, index) ⇒ Object



331
332
333
334
335
336
337
# File 'lib/gpgme/ffi/functions.rb', line 331

def self.gpgme_signers_enum(context, index)
  ptr = Library.gpgme_signers_enum context.context_pointer, index

  return nil if ptr.null?

  Key.new_from_struct Library::Key.new(ptr)
end

.gpgme_strerror(error) ⇒ Object



99
100
101
# File 'lib/gpgme/ffi/functions.rb', line 99

def self.gpgme_strerror(error)
  Library.gpgme_strerror error
end

.gpgme_wait(context, rstatus, hang) ⇒ Object



353
354
355
356
357
358
359
360
361
362
363
# File 'lib/gpgme/ffi/functions.rb', line 353

def self.gpgme_wait(context, rstatus, hang)
  buf = FFI::Buffer.new :uint, 1

  rctx = Library.gpgme_wait Meta.ffize_value(context), buf, hang

  return nil if rctx.null?

  rstatus << buf.read_uint

  Ctx.new_from_struct rctx
end