PostgreSQL Source Code
git master
|
Go to the source code of this file.
Data Structures | |
struct | PGP_S2K |
struct | PGP_Context |
struct | PGP_MPI |
struct | PGP_PubKey |
Macros | |
#define | PGP_MAX_KEY (256/8) |
#define | PGP_MAX_BLOCK (256/8) |
#define | PGP_MAX_DIGEST (512/8) |
#define | PGP_S2K_SALT 8 |
#define | s2k_decode_count(cval) (((unsigned) 16 + (cval & 15)) << ((cval >> 4) + 6)) |
Typedefs | |
typedef struct PGP_MPI | PGP_MPI |
typedef struct PGP_PubKey | PGP_PubKey |
typedef struct PGP_Context | PGP_Context |
typedef struct PGP_S2K | PGP_S2K |
typedef struct PGP_CFB | PGP_CFB |
Variables | |
struct PullFilterOps | pgp_decrypt_filter |
#define PGP_MAX_BLOCK (256/8) |
Definition at line 113 of file pgp.h.
Referenced by prefix_init(), and write_prefix().
#define PGP_MAX_DIGEST (512/8) |
Definition at line 114 of file pgp.h.
Referenced by calc_s2k_iter_salted(), calc_s2k_salted(), and calc_s2k_simple().
#define PGP_MAX_KEY (256/8) |
Definition at line 112 of file pgp.h.
Referenced by parse_symenc_sesskey().
#define PGP_S2K_SALT 8 |
Definition at line 115 of file pgp.h.
Referenced by calc_s2k_iter_salted(), calc_s2k_salted(), and pgp_s2k_fill().
#define s2k_decode_count | ( | cval | ) | (((unsigned) 16 + (cval & 15)) << ((cval >> 4) + 6)) |
Definition at line 176 of file pgp.h.
Referenced by calc_s2k_iter_salted(), decide_s2k_iter(), and parse_symenc_sesskey().
typedef struct PGP_Context PGP_Context |
typedef struct PGP_PubKey PGP_PubKey |
enum PGP_COMPR_TYPE |
enum PGP_DIGEST_TYPE |
Enumerator | |
---|---|
PGP_DIGEST_MD5 | |
PGP_DIGEST_SHA1 | |
PGP_DIGEST_RIPEMD160 | |
PGP_DIGEST_XSHA | |
PGP_DIGEST_MD2 | |
PGP_DIGEST_TIGER192 | |
PGP_DIGEST_HAVAL5_160 | |
PGP_DIGEST_SHA256 | |
PGP_DIGEST_SHA384 | |
PGP_DIGEST_SHA512 |
enum PGP_PKT_TYPE |
Definition at line 44 of file pgp.h.
enum PGP_PUB_ALGO_TYPE |
enum PGP_S2K_TYPE |
enum PGP_SYMENC_TYPE |
Enumerator | |
---|---|
PGP_SYM_PLAIN | |
PGP_SYM_IDEA | |
PGP_SYM_DES3 | |
PGP_SYM_CAST5 | |
PGP_SYM_BLOWFISH | |
PGP_SYM_SAFER_SK128 | |
PGP_SYM_DES_SK | |
PGP_SYM_AES_128 | |
PGP_SYM_AES_192 | |
PGP_SYM_AES_256 | |
PGP_SYM_TWOFISH |
int _pgp_read_public_key | ( | PullFilter * | pkt, |
PGP_PubKey ** | pk_p | ||
) |
Definition at line 159 of file pgp-pubkey.c.
References PGP_PubKey::algo, calc_key_id(), PGP_PubKey::can_encrypt, PGP_PubKey::dsa, PGP_PubKey::elg, GETBYTE, pgp_key_alloc(), pgp_key_free(), pgp_mpi_read(), PGP_PUB_DSA_SIGN, PGP_PUB_ELG_ENCRYPT, PGP_PUB_RSA_ENCRYPT, PGP_PUB_RSA_ENCRYPT_SIGN, PGP_PUB_RSA_SIGN, PGP_PubKey::pub, pullf_read_fixed(), px_debug(), PXE_PGP_NOT_V4_KEYPKT, PXE_PGP_UNKNOWN_PUBALGO, PGP_PubKey::rsa, PGP_PubKey::time, and PGP_PubKey::ver.
Referenced by internal_read_key(), process_secret_key(), and read_pubkey_keyid().
int pgp_armor_decode | ( | const uint8 * | src, |
int | len, | ||
StringInfo | dst | ||
) |
Definition at line 314 of file pgp-armor.c.
References buf, crc24(), StringInfoData::data, elog, enlargeStringInfo(), FATAL, find_header(), StringInfoData::len, pg_base64_dec_len(), pg_base64_decode(), and PXE_PGP_CORRUPT_ARMOR.
Referenced by pg_dearmor().
void pgp_armor_encode | ( | const uint8 * | src, |
unsigned | len, | ||
StringInfo | dst, | ||
int | num_headers, | ||
char ** | keys, | ||
char ** | values | ||
) |
Definition at line 207 of file pgp-armor.c.
References _base64, appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), armor_footer, armor_header, crc24(), StringInfoData::data, elog, enlargeStringInfo(), FATAL, StringInfoData::len, pg_base64_enc_len(), and pg_base64_encode().
Referenced by pg_armor().
int pgp_cfb_create | ( | PGP_CFB ** | ctx_p, |
int | algo, | ||
const uint8 * | key, | ||
int | key_len, | ||
int | resync, | ||
uint8 * | iv | ||
) |
Definition at line 52 of file pgp-cfb.c.
References PGP_CFB::block_size, PGP_CFB::ciph, PGP_CFB::fr, pgp_load_cipher(), px_alloc, px_cipher_block_size, px_cipher_free, px_cipher_init, and PGP_CFB::resync.
Referenced by decrypt_key(), encrypt_init(), parse_symenc_data(), parse_symenc_mdc_data(), process_secret_key(), and symencrypt_sesskey().
Definition at line 259 of file pgp-cfb.c.
References cfb_process(), mix, mix_decrypt_normal(), mix_decrypt_resync(), and PGP_CFB::resync.
Referenced by decrypt_key(), and decrypt_read().
Definition at line 251 of file pgp-cfb.c.
References cfb_process(), mix, mix_encrypt_normal(), mix_encrypt_resync(), and PGP_CFB::resync.
Referenced by encrypt_process(), and symencrypt_sesskey().
void pgp_cfb_free | ( | PGP_CFB * | ctx | ) |
Definition at line 84 of file pgp-cfb.c.
References PGP_CFB::ciph, px_cipher_free, px_free, and px_memset().
Referenced by decrypt_key(), encrypt_free(), parse_symenc_data(), parse_symenc_mdc_data(), process_secret_key(), and symencrypt_sesskey().
int pgp_compress_filter | ( | PushFilter ** | res, |
PGP_Context * | ctx, | ||
PushFilter * | dst | ||
) |
Definition at line 316 of file pgp-compress.c.
References PXE_PGP_UNSUPPORTED_COMPR.
Referenced by init_compress().
int pgp_create_pkt_reader | ( | PullFilter ** | pf_p, |
PullFilter * | src, | ||
int | len, | ||
int | pkttype, | ||
PGP_Context * | ctx | ||
) |
Definition at line 223 of file pgp-decrypt.c.
References PktData::len, pullf_create(), px_alloc, px_free, and PktData::type.
Referenced by internal_read_key(), pgp_decrypt(), pgp_get_keyid(), and process_data_packets().
int pgp_create_pkt_writer | ( | PushFilter * | dst, |
int | tag, | ||
PushFilter ** | res_p | ||
) |
Definition at line 312 of file pgp-encrypt.c.
References pushf_create(), and write_tag_only().
Referenced by pgp_write_pubenc_sesskey().
int pgp_decompress_filter | ( | PullFilter ** | res, |
PGP_Context * | ctx, | ||
PullFilter * | src | ||
) |
Definition at line 322 of file pgp-compress.c.
References PXE_PGP_UNSUPPORTED_COMPR.
Referenced by parse_compressed_data().
int pgp_decrypt | ( | PGP_Context * | ctx, |
MBuf * | src, | ||
MBuf * | dst | ||
) |
Definition at line 1093 of file pgp-decrypt.c.
References PGP_Context::corrupt_prefix, PGP_Context::disable_mdc, PktData::len, NO_CTX_SIZE, parse_symenc_data(), parse_symenc_mdc_data(), parse_symenc_sesskey(), pgp_create_pkt_reader(), pgp_parse_pkt_hdr(), pgp_parse_pubenc_sesskey(), PGP_PKT_MARKER, PGP_PKT_PUBENCRYPTED_SESSKEY, PGP_PKT_SYMENCRYPTED_DATA, PGP_PKT_SYMENCRYPTED_DATA_MDC, PGP_PKT_SYMENCRYPTED_SESSKEY, pgp_skip_packet(), pullf_create_mbuf_reader(), pullf_free(), px_debug(), PXE_PGP_CORRUPT_DATA, PXE_PGP_NOT_TEXT, PXE_PGP_UNSUPPORTED_COMPR, PGP_Context::unexpected_binary, and PGP_Context::unsupported_compr.
Referenced by decrypt_internal().
int pgp_disable_mdc | ( | PGP_Context * | ctx, |
int | disable | ||
) |
int pgp_elgamal_decrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | c1, | ||
PGP_MPI * | c2, | ||
PGP_MPI ** | m | ||
) |
Definition at line 213 of file pgp-mpi-internal.c.
References bn_to_mpi(), PGP_PubKey::elg, mp_clear_free(), mp_int_exptmod(), mp_int_invmod(), mp_modmul(), mp_new(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, and PGP_PubKey::sec.
Referenced by decrypt_elgamal().
int pgp_elgamal_encrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | m, | ||
PGP_MPI ** | c1, | ||
PGP_MPI ** | c2 | ||
) |
Definition at line 163 of file pgp-mpi-internal.c.
References bn_to_mpi(), decide_k_bits(), PGP_PubKey::elg, mp_clear_free(), mp_int_count_bits(), mp_int_exptmod(), mp_modmul(), mp_new(), mp_px_rand(), mpi_to_bn(), PGP_PubKey::pub, and PXE_PGP_MATH_FAILED.
Referenced by encrypt_and_write_elgamal().
int pgp_encrypt | ( | PGP_Context * | ctx, |
MBuf * | src, | ||
MBuf * | dst | ||
) |
Definition at line 600 of file pgp-encrypt.c.
References EncStat::buf, PGP_Context::compress_algo, PGP_Context::compress_level, PGP_Context::convert_crlf, PGP_Context::disable_mdc, init_compress(), init_encdata_packet(), init_litdata_packet(), init_s2k_key(), init_sess_key(), mbuf_avail(), mbuf_grab(), pgp_write_pubenc_sesskey(), PGP_Context::pub_key, pushf_create(), pushf_create_mbuf_writer(), pushf_flush(), pushf_free_all(), pushf_write(), PXE_ARGUMENT_ERROR, PGP_Context::sym_key, PGP_Context::text_mode, write_prefix(), and write_symenc_sesskey().
Referenced by encrypt_internal().
int pgp_expect_packet_end | ( | PullFilter * | pkt | ) |
Definition at line 1078 of file pgp-decrypt.c.
References pullf_read(), px_debug(), and PXE_PGP_CORRUPT_DATA.
Referenced by pgp_parse_pubenc_sesskey(), and process_secret_key().
int pgp_extract_armor_headers | ( | const uint8 * | src, |
unsigned | len, | ||
int * | nheaders, | ||
char *** | keys, | ||
char *** | values | ||
) |
Definition at line 390 of file pgp-armor.c.
References buf, elog, ERROR, find_header(), palloc(), and PXE_PGP_CORRUPT_ARMOR.
Referenced by pgp_armor_headers().
int pgp_free | ( | PGP_Context * | ctx | ) |
Definition at line 224 of file pgp.c.
References pgp_key_free(), PGP_Context::pub_key, px_free, and px_memset().
Referenced by decrypt_internal(), and encrypt_internal().
int pgp_get_cipher_block_size | ( | int | c | ) |
Definition at line 157 of file pgp.c.
References cipher_info::block_len, get_cipher_info(), and i.
Referenced by prefix_init(), process_secret_key(), and write_prefix().
int pgp_get_cipher_code | ( | const char * | name | ) |
Definition at line 115 of file pgp.c.
References cipher_info::code, i, cipher_info::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 | c | ) |
Definition at line 147 of file pgp.c.
References get_cipher_info(), i, and cipher_info::key_len.
Referenced by decrypt_key(), init_sess_key(), and pgp_s2k_process().
const char* pgp_get_cipher_name | ( | int | code | ) |
Definition at line 137 of file pgp.c.
References get_cipher_info(), i, and cipher_info::name.
int pgp_get_digest_code | ( | const char * | name | ) |
Definition at line 104 of file pgp.c.
References digest_info::code, i, digest_info::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, i, and digest_info::name.
Referenced by pgp_load_digest().
int pgp_get_keyid | ( | MBuf * | pgp_data, |
char * | dst | ||
) |
Definition at line 112 of file pgp-info.c.
References any_key, pgp_create_pkt_reader(), pgp_parse_pkt_hdr(), PGP_PKT_MARKER, PGP_PKT_PRIV_61, PGP_PKT_PUBENCRYPTED_SESSKEY, PGP_PKT_PUBLIC_KEY, PGP_PKT_PUBLIC_SUBKEY, PGP_PKT_SECRET_KEY, PGP_PKT_SECRET_SUBKEY, PGP_PKT_SIGNATURE, PGP_PKT_SYMENCRYPTED_DATA, PGP_PKT_SYMENCRYPTED_DATA_MDC, PGP_PKT_SYMENCRYPTED_SESSKEY, PGP_PKT_TRUST, PGP_PKT_USER_ATTR, PGP_PKT_USER_ID, pgp_skip_packet(), print_key(), pullf_create_mbuf_reader(), pullf_free(), PXE_PGP_CORRUPT_DATA, PXE_PGP_MULTIPLE_KEYS, PXE_PGP_NO_USABLE_KEY, read_pubenc_keyid(), and read_pubkey_keyid().
Referenced by pgp_key_id_w().
int pgp_get_unicode_mode | ( | PGP_Context * | ctx | ) |
Definition at line 351 of file pgp.c.
References PGP_Context::unicode_mode.
Referenced by decrypt_internal(), and encrypt_internal().
int pgp_init | ( | PGP_Context ** | ctx | ) |
Definition at line 199 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, px_alloc, 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_key_alloc | ( | PGP_PubKey ** | pk_p | ) |
Definition at line 38 of file pgp-pubkey.c.
References px_alloc.
Referenced by _pgp_read_public_key().
void pgp_key_free | ( | PGP_PubKey * | pk | ) |
Definition at line 49 of file pgp-pubkey.c.
References PGP_PubKey::algo, PGP_PubKey::dsa, PGP_PubKey::elg, pgp_mpi_free(), PGP_PUB_DSA_SIGN, PGP_PUB_ELG_ENCRYPT, PGP_PUB_RSA_ENCRYPT, PGP_PUB_RSA_ENCRYPT_SIGN, PGP_PUB_RSA_SIGN, PGP_PubKey::pub, px_free, px_memset(), PGP_PubKey::rsa, and PGP_PubKey::sec.
Referenced by _pgp_read_public_key(), internal_read_key(), pgp_free(), process_secret_key(), and read_pubkey_keyid().
int pgp_load_cipher | ( | int | c, |
PX_Cipher ** | res | ||
) |
Definition at line 167 of file pgp.c.
References get_cipher_info(), i, cipher_info::int_name, px_find_cipher(), PXE_PGP_CORRUPT_DATA, and PXE_PGP_UNSUPPORTED_CIPHER.
Referenced by pgp_cfb_create().
int pgp_load_digest | ( | int | c, |
PX_MD ** | res | ||
) |
Definition at line 183 of file pgp.c.
References digest_info::name, pgp_get_digest_name(), px_find_digest(), PXE_PGP_CORRUPT_DATA, and PXE_PGP_UNSUPPORTED_HASH.
Referenced by calc_key_id(), check_key_sha1(), mdc_init(), and pgp_s2k_process().
int pgp_mpi_alloc | ( | int | bits, |
PGP_MPI ** | mpi | ||
) |
Definition at line 37 of file pgp-mpi.c.
References PGP_MPI::bits, PGP_MPI::bytes, PGP_MPI::data, px_alloc, px_debug(), and PXE_PGP_CORRUPT_DATA.
Referenced by bn_to_mpi(), pgp_mpi_create(), and pgp_mpi_read().
unsigned pgp_mpi_cksum | ( | unsigned | cksum, |
PGP_MPI * | n | ||
) |
Definition at line 132 of file pgp-mpi.c.
References PGP_MPI::bits, PGP_MPI::bytes, PGP_MPI::data, and i.
Referenced by check_key_cksum().
Definition at line 56 of file pgp-mpi.c.
References PGP_MPI::bytes, PGP_MPI::data, and pgp_mpi_alloc().
Referenced by create_secmsg().
int pgp_mpi_free | ( | PGP_MPI * | mpi | ) |
Definition at line 70 of file pgp-mpi.c.
References PGP_MPI::bytes, px_free, and px_memset().
Referenced by bn_to_mpi(), decrypt_elgamal(), decrypt_rsa(), encrypt_and_write_elgamal(), encrypt_and_write_rsa(), pgp_key_free(), pgp_mpi_read(), and pgp_parse_pubenc_sesskey().
Definition at line 119 of file pgp-mpi.c.
References PGP_MPI::bits, buf, PGP_MPI::bytes, PGP_MPI::data, and px_md_update.
Referenced by calc_key_id(), and check_key_sha1().
int pgp_mpi_read | ( | PullFilter * | src, |
PGP_MPI ** | mpi | ||
) |
Definition at line 80 of file pgp-mpi.c.
References PGP_MPI::bytes, PGP_MPI::data, pgp_mpi_alloc(), pgp_mpi_free(), and pullf_read_fixed().
Referenced by _pgp_read_public_key(), decrypt_elgamal(), decrypt_rsa(), and process_secret_key().
int pgp_mpi_write | ( | PushFilter * | dst, |
PGP_MPI * | n | ||
) |
Definition at line 105 of file pgp-mpi.c.
References PGP_MPI::bits, buf, PGP_MPI::bytes, PGP_MPI::data, and pushf_write().
Referenced by encrypt_and_write_elgamal(), and encrypt_and_write_rsa().
int pgp_parse_pkt_hdr | ( | PullFilter * | src, |
uint8 * | tag, | ||
int * | len_p, | ||
int | allow_ctx | ||
) |
Definition at line 129 of file pgp-decrypt.c.
References parse_new_len(), parse_old_len(), PKT_CONTEXT, pullf_read(), px_debug(), and PXE_PGP_CORRUPT_DATA.
Referenced by internal_read_key(), pgp_decrypt(), pgp_get_keyid(), and process_data_packets().
int pgp_parse_pubenc_sesskey | ( | PGP_Context * | ctx, |
PullFilter * | pkt | ||
) |
Definition at line 150 of file pgp-pubdec.c.
References any_key, PGP_MPI::bytes, check_eme_pkcs1_v15(), PGP_Context::cipher_algo, control_cksum(), PGP_MPI::data, decrypt_elgamal(), decrypt_rsa(), GETBYTE, PGP_PubKey::key_id, pgp_expect_packet_end(), pgp_mpi_free(), PGP_PUB_ELG_ENCRYPT, PGP_PUB_RSA_ENCRYPT, PGP_PUB_RSA_ENCRYPT_SIGN, PGP_Context::pub_key, pullf_read_fixed(), px_debug(), PXE_BUG, PXE_PGP_CORRUPT_DATA, PXE_PGP_UNKNOWN_PUBALGO, PXE_PGP_WRONG_KEY, PGP_Context::sess_key, and PGP_Context::sess_key_len.
Referenced by pgp_decrypt().
int pgp_rsa_decrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | c, | ||
PGP_MPI ** | m | ||
) |
Definition at line 279 of file pgp-mpi-internal.c.
References bn_to_mpi(), mp_clear_free(), mp_int_exptmod(), mp_new(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, PGP_PubKey::rsa, and PGP_PubKey::sec.
Referenced by decrypt_rsa().
int pgp_rsa_encrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | m, | ||
PGP_MPI ** | c | ||
) |
Definition at line 251 of file pgp-mpi-internal.c.
References bn_to_mpi(), mp_clear_free(), mp_int_exptmod(), mp_new(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, and PGP_PubKey::rsa.
Referenced by encrypt_and_write_rsa().
int pgp_s2k_fill | ( | PGP_S2K * | s2k, |
int | mode, | ||
int | digest_algo, | ||
int | count | ||
) |
Definition at line 223 of file pgp-s2k.c.
References decide_s2k_iter(), PGP_S2K::digest_algo, PGP_S2K::iter, mode, PGP_S2K::mode, pg_strong_random(), PGP_S2K_ISALTED, PGP_S2K_SALT, PGP_S2K_SALTED, PGP_S2K_SIMPLE, PXE_NO_RANDOM, PXE_PGP_BAD_S2K_MODE, and PGP_S2K::salt.
Referenced by init_s2k_key().
Definition at line 279 of file pgp-s2k.c.
References calc_s2k_iter_salted(), calc_s2k_salted(), calc_s2k_simple(), PGP_S2K::digest_algo, PGP_S2K::key_len, PGP_S2K::mode, pgp_get_cipher_key_size(), pgp_load_digest(), px_md_free, PXE_PGP_BAD_S2K_MODE, and PXE_PGP_UNSUPPORTED_CIPHER.
Referenced by init_s2k_key(), parse_symenc_sesskey(), and process_secret_key().
int pgp_s2k_read | ( | PullFilter * | src, |
PGP_S2K * | s2k | ||
) |
Definition at line 253 of file pgp-s2k.c.
References PGP_S2K::digest_algo, GETBYTE, PGP_S2K::iter, PGP_S2K::mode, pullf_read_fixed(), PXE_PGP_BAD_S2K_MODE, and PGP_S2K::salt.
Referenced by parse_symenc_sesskey(), and process_secret_key().
int pgp_set_cipher_algo | ( | PGP_Context * | ctx, |
const char * | name | ||
) |
Definition at line 318 of file pgp.c.
References PGP_Context::cipher_algo, digest_info::code, and pgp_get_cipher_code().
Referenced by set_arg().
int pgp_set_compress_algo | ( | PGP_Context * | ctx, |
int | algo | ||
) |
Definition at line 285 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 300 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 248 of file pgp.c.
References PGP_Context::convert_crlf.
Referenced by set_arg().
int pgp_set_pubkey | ( | PGP_Context * | ctx, |
MBuf * | keypkt, | ||
const uint8 * | key, | ||
int | klen, | ||
int | pubtype | ||
) |
Definition at line 566 of file pgp-pubkey.c.
References internal_read_key(), PGP_Context::pub_key, pullf_create_mbuf_reader(), and pullf_free().
Referenced by decrypt_internal(), and encrypt_internal().
int pgp_set_s2k_cipher_algo | ( | PGP_Context * | ctx, |
const char * | name | ||
) |
Definition at line 329 of file pgp.c.
References digest_info::code, 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 274 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 340 of file pgp.c.
References digest_info::code, pgp_get_digest_code(), and PGP_Context::s2k_digest_algo.
Referenced by set_arg().
int pgp_set_s2k_mode | ( | PGP_Context * | ctx, |
int | type | ||
) |
Definition at line 255 of file pgp.c.
References 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 241 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 | klen | ||
) |
Definition at line 364 of file pgp.c.
References sort-test::key, 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 311 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 357 of file pgp.c.
References PGP_Context::unicode_mode.
Referenced by set_arg().
int pgp_skip_packet | ( | PullFilter * | pkt | ) |
Definition at line 1064 of file pgp-decrypt.c.
References pullf_read().
Referenced by internal_read_key(), pgp_decrypt(), pgp_get_keyid(), read_pubenc_keyid(), and read_pubkey_keyid().
int pgp_write_pubenc_sesskey | ( | PGP_Context * | ctx, |
PushFilter * | dst | ||
) |
Definition at line 190 of file pgp-pubenc.c.
References PGP_PubKey::algo, encrypt_and_write_elgamal(), encrypt_and_write_rsa(), PGP_PubKey::key_id, pgp_create_pkt_writer(), PGP_PKT_PUBENCRYPTED_SESSKEY, PGP_PUB_ELG_ENCRYPT, PGP_PUB_RSA_ENCRYPT, PGP_PUB_RSA_ENCRYPT_SIGN, PGP_Context::pub_key, pushf_flush(), pushf_free(), pushf_write(), px_debug(), and PXE_BUG.
Referenced by pgp_encrypt().
struct PullFilterOps pgp_decrypt_filter |
Definition at line 313 of file pgp-decrypt.c.
Referenced by process_secret_key().