PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | digest_info |
struct | cipher_info |
Variables | |
static int | def_cipher_algo = PGP_SYM_AES_128 |
static int | def_s2k_cipher_algo = -1 |
static int | def_s2k_mode = PGP_S2K_ISALTED |
static int | def_s2k_count = -1 |
static int | def_s2k_digest_algo = PGP_DIGEST_SHA1 |
static int | def_compress_algo = PGP_COMPR_NONE |
static int | def_compress_level = 6 |
static int | def_disable_mdc = 0 |
static int | def_use_sess_key = 0 |
static int | def_text_mode = 0 |
static int | def_unicode_mode = 0 |
static int | def_convert_crlf = 0 |
static const struct digest_info | digest_list [] |
static const struct cipher_info | cipher_list [] |
|
static |
Definition at line 93 of file pgp.c.
References cipher_list, cipher_info::code, and i.
Referenced by pgp_get_cipher_block_size(), pgp_get_cipher_key_size(), and pgp_load_cipher().
int pgp_disable_mdc | ( | PGP_Context * | ctx, |
int | disable | ||
) |
int pgp_free | ( | PGP_Context * | ctx | ) |
Definition at line 213 of file pgp.c.
References pfree(), pgp_key_free(), PGP_Context::pub_key, and px_memset().
Referenced by decrypt_internal(), and encrypt_internal().
int pgp_get_cipher_block_size | ( | int | code | ) |
Definition at line 147 of file pgp.c.
References cipher_info::code, get_cipher_info(), and i.
Referenced by process_secret_key(), and write_prefix().
int pgp_get_cipher_code | ( | const char * | name | ) |
Definition at line 115 of file pgp.c.
References cipher_list, i, name, pg_strcasecmp(), and PXE_PGP_UNSUPPORTED_CIPHER.
Referenced by pgp_set_cipher_algo(), pgp_set_s2k_cipher_algo(), and set_arg().
int pgp_get_cipher_key_size | ( | int | code | ) |
Definition at line 137 of file pgp.c.
References cipher_info::code, get_cipher_info(), and i.
Referenced by decrypt_key(), init_sess_key(), and pgp_s2k_process().
int pgp_get_digest_code | ( | const char * | name | ) |
Definition at line 104 of file pgp.c.
References digest_list, i, name, pg_strcasecmp(), and PXE_PGP_UNSUPPORTED_HASH.
Referenced by pgp_set_s2k_digest_algo(), and set_arg().
const char* pgp_get_digest_name | ( | int | code | ) |
Definition at line 126 of file pgp.c.
References digest_info::code, digest_list, and i.
Referenced by pgp_load_digest().
int pgp_get_unicode_mode | ( | PGP_Context * | ctx | ) |
Definition at line 340 of file pgp.c.
References PGP_Context::unicode_mode.
Referenced by decrypt_internal(), and encrypt_internal().
int pgp_init | ( | PGP_Context ** | ctx_p | ) |
Definition at line 189 of file pgp.c.
References PGP_Context::cipher_algo, PGP_Context::compress_algo, PGP_Context::compress_level, PGP_Context::convert_crlf, def_cipher_algo, def_compress_algo, def_compress_level, def_convert_crlf, def_disable_mdc, def_s2k_cipher_algo, def_s2k_count, def_s2k_digest_algo, def_s2k_mode, def_text_mode, def_unicode_mode, def_use_sess_key, PGP_Context::disable_mdc, palloc0(), PGP_Context::s2k_cipher_algo, PGP_Context::s2k_count, PGP_Context::s2k_digest_algo, PGP_Context::s2k_mode, PGP_Context::text_mode, PGP_Context::unicode_mode, and PGP_Context::use_sess_key.
Referenced by init_work().
int pgp_load_cipher | ( | int | code, |
PX_Cipher ** | res | ||
) |
Definition at line 157 of file pgp.c.
References cipher_info::code, err(), get_cipher_info(), i, px_find_cipher(), PXE_PGP_CORRUPT_DATA, PXE_PGP_UNSUPPORTED_CIPHER, and res.
Referenced by pgp_cfb_create().
int pgp_load_digest | ( | int | code, |
PX_MD ** | res | ||
) |
Definition at line 173 of file pgp.c.
References cipher_info::code, err(), name, pgp_get_digest_name(), px_find_digest(), PXE_PGP_CORRUPT_DATA, PXE_PGP_UNSUPPORTED_HASH, and res.
Referenced by calc_key_id(), check_key_sha1(), mdc_init(), and pgp_s2k_process().
int pgp_set_cipher_algo | ( | PGP_Context * | ctx, |
const char * | name | ||
) |
Definition at line 307 of file pgp.c.
References PGP_Context::cipher_algo, cipher_info::code, name, and pgp_get_cipher_code().
Referenced by set_arg().
int pgp_set_compress_algo | ( | PGP_Context * | ctx, |
int | algo | ||
) |
Definition at line 274 of file pgp.c.
References PGP_Context::compress_algo, PGP_COMPR_BZIP2, PGP_COMPR_NONE, PGP_COMPR_ZIP, PGP_COMPR_ZLIB, and PXE_ARGUMENT_ERROR.
Referenced by set_arg().
int pgp_set_compress_level | ( | PGP_Context * | ctx, |
int | level | ||
) |
Definition at line 289 of file pgp.c.
References PGP_Context::compress_level, and PXE_ARGUMENT_ERROR.
Referenced by set_arg().
int pgp_set_convert_crlf | ( | PGP_Context * | ctx, |
int | doit | ||
) |
Definition at line 237 of file pgp.c.
References PGP_Context::convert_crlf.
Referenced by set_arg().
int pgp_set_s2k_cipher_algo | ( | PGP_Context * | ctx, |
const char * | name | ||
) |
Definition at line 318 of file pgp.c.
References cipher_info::code, name, pgp_get_cipher_code(), and PGP_Context::s2k_cipher_algo.
Referenced by set_arg().
int pgp_set_s2k_count | ( | PGP_Context * | ctx, |
int | count | ||
) |
Definition at line 263 of file pgp.c.
References PGP_S2K_ISALTED, PXE_ARGUMENT_ERROR, PXE_OK, PGP_Context::s2k_count, and PGP_Context::s2k_mode.
Referenced by set_arg().
int pgp_set_s2k_digest_algo | ( | PGP_Context * | ctx, |
const char * | name | ||
) |
Definition at line 329 of file pgp.c.
References cipher_info::code, name, pgp_get_digest_code(), and PGP_Context::s2k_digest_algo.
Referenced by set_arg().
int pgp_set_s2k_mode | ( | PGP_Context * | ctx, |
int | mode | ||
) |
Definition at line 244 of file pgp.c.
References err(), mode, PGP_S2K_ISALTED, PGP_S2K_SALTED, PGP_S2K_SIMPLE, PXE_ARGUMENT_ERROR, PXE_OK, and PGP_Context::s2k_mode.
Referenced by set_arg().
int pgp_set_sess_key | ( | PGP_Context * | ctx, |
int | use | ||
) |
Definition at line 230 of file pgp.c.
References PGP_Context::use_sess_key.
Referenced by set_arg().
int pgp_set_symkey | ( | PGP_Context * | ctx, |
const uint8 * | key, | ||
int | len | ||
) |
Definition at line 353 of file pgp.c.
References sort-test::key, len, PXE_ARGUMENT_ERROR, PGP_Context::sym_key, and PGP_Context::sym_key_len.
Referenced by decrypt_internal(), and encrypt_internal().
int pgp_set_text_mode | ( | PGP_Context * | ctx, |
int | mode | ||
) |
Definition at line 300 of file pgp.c.
References mode, and PGP_Context::text_mode.
Referenced by init_work().
int pgp_set_unicode_mode | ( | PGP_Context * | ctx, |
int | mode | ||
) |
Definition at line 346 of file pgp.c.
References mode, and PGP_Context::unicode_mode.
Referenced by set_arg().
|
static |
Definition at line 51 of file pgp.c.
Referenced by get_cipher_info(), and pgp_get_cipher_code().
|
static |
Definition at line 40 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 45 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 46 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 51 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 47 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 41 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 43 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 44 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 42 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 49 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 50 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 48 of file pgp.c.
Referenced by pgp_init().
|
static |
Definition at line 51 of file pgp.c.
Referenced by pgp_get_digest_code(), and pgp_get_digest_name().