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 s2k_decode_count | ( | cval | ) | (((unsigned) 16 + (cval & 15)) << ((cval >> 4) + 6)) |
typedef struct PGP_Context PGP_Context |
typedef struct PGP_PubKey PGP_PubKey |
enum PGP_COMPR_TYPE |
enum PGP_DIGEST_TYPE |
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 |
int _pgp_read_public_key | ( | PullFilter * | pkt, |
PGP_PubKey ** | pk_p | ||
) |
Definition at line 158 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, res, 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, crc, crc24(), StringInfoData::data, elog, enlargeStringInfo(), FATAL, find_header(), StringInfoData::len, len, pg_base64_dec_len(), pg_base64_decode(), PXE_PGP_CORRUPT_ARMOR, and res.
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, crc, crc24(), StringInfoData::data, elog, enlargeStringInfo(), FATAL, StringInfoData::len, len, pg_base64_enc_len(), pg_base64_encode(), res, and values.
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, sort-test::key, palloc0(), pgp_load_cipher(), px_cipher_block_size, px_cipher_free, px_cipher_init, res, 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 260 of file pgp-cfb.c.
References cfb_process(), data, len, mix, mix_decrypt_normal(), mix_decrypt_resync(), and PGP_CFB::resync.
Referenced by decrypt_key(), and decrypt_read().
Definition at line 252 of file pgp-cfb.c.
References cfb_process(), data, len, 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 83 of file pgp-cfb.c.
References PGP_CFB::ciph, pfree(), px_cipher_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 335 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, len, palloc(), pfree(), pktreader_filter, pullf_create(), res, 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 311 of file pgp-encrypt.c.
References pkt_stream_filter, pushf_create(), res, and write_tag_only().
Referenced by pgp_write_pubenc_sesskey().
int pgp_decompress_filter | ( | PullFilter ** | res, |
PGP_Context * | ctx, | ||
PullFilter * | src | ||
) |
Definition at line 341 of file pgp-compress.c.
References PXE_PGP_UNSUPPORTED_COMPR.
Referenced by parse_compressed_data().
int pgp_decrypt | ( | PGP_Context * | ctx, |
MBuf * | msrc, | ||
MBuf * | mdst | ||
) |
Definition at line 1093 of file pgp-decrypt.c.
References PGP_Context::corrupt_prefix, PGP_Context::disable_mdc, 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, res, 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 ** | msg_p | ||
) |
Definition at line 164 of file pgp-mpi-openssl.c.
References bn_to_mpi(), PGP_PubKey::elg, err(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, res, PGP_PubKey::sec, and x.
Referenced by decrypt_elgamal().
int pgp_elgamal_encrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | _m, | ||
PGP_MPI ** | c1_p, | ||
PGP_MPI ** | c2_p | ||
) |
Definition at line 101 of file pgp-mpi-openssl.c.
References bn_to_mpi(), decide_k_bits(), PGP_PubKey::elg, err(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, res, and y.
Referenced by encrypt_and_write_elgamal().
int pgp_encrypt | ( | PGP_Context * | ctx, |
MBuf * | src, | ||
MBuf * | dst | ||
) |
Definition at line 599 of file pgp-encrypt.c.
References buf, PGP_Context::compress_algo, PGP_Context::compress_level, PGP_Context::convert_crlf, crlf_filter, PGP_Context::disable_mdc, encrypt_filter, init_compress(), init_encdata_packet(), init_litdata_packet(), init_s2k_key(), init_sess_key(), len, mbuf_avail(), mbuf_grab(), mdc_filter, pgp_write_pubenc_sesskey(), PGP_Context::pub_key, pushf_create(), pushf_create_mbuf_writer(), pushf_flush(), pushf_free_all(), pushf_write(), PXE_ARGUMENT_ERROR, res, 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(), PXE_PGP_CORRUPT_DATA, and res.
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, colon, elog, ERROR, find_header(), len, palloc(), PXE_PGP_CORRUPT_ARMOR, and values.
Referenced by pgp_armor_headers().
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_keyid | ( | MBuf * | pgp_data, |
char * | dst | ||
) |
Definition at line 112 of file pgp-info.c.
References any_key, len, 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(), read_pubkey_keyid(), and res.
Referenced by pgp_key_id_w().
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_key_alloc | ( | PGP_PubKey ** | pk_p | ) |
Definition at line 38 of file pgp-pubkey.c.
References palloc0().
Referenced by _pgp_read_public_key().
void pgp_key_free | ( | PGP_PubKey * | pk | ) |
Definition at line 48 of file pgp-pubkey.c.
References PGP_PubKey::algo, PGP_PubKey::dsa, PGP_PubKey::elg, pfree(), 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_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 | 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_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, len, palloc(), 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, data, pgp_mpi_alloc(), and res.
Referenced by create_secmsg().
int pgp_mpi_free | ( | PGP_MPI * | mpi | ) |
Definition at line 70 of file pgp-mpi.c.
References PGP_MPI::bytes, pfree(), 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(), pullf_read_fixed(), and res.
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, pushf_write(), and res.
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(), PXE_PGP_CORRUPT_DATA, and res.
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, res, 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_p | ||
) |
Definition at line 251 of file pgp-mpi-openssl.c.
References bn_to_mpi(), err(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, res, PGP_PubKey::rsa, and PGP_PubKey::sec.
Referenced by decrypt_rsa().
int pgp_rsa_encrypt | ( | PGP_PubKey * | pk, |
PGP_MPI * | _m, | ||
PGP_MPI ** | c_p | ||
) |
Definition at line 215 of file pgp-mpi-openssl.c.
References bn_to_mpi(), err(), mpi_to_bn(), PGP_PubKey::pub, PXE_PGP_MATH_FAILED, res, 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, PGP_S2K::mode, mode, pg_strong_random(), PGP_S2K_ISALTED, PGP_S2K_SALT, PGP_S2K_SALTED, PGP_S2K_SIMPLE, PXE_NO_RANDOM, PXE_PGP_BAD_S2K_MODE, res, 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, sort-test::key, PGP_S2K::key_len, PGP_S2K::mode, pgp_get_cipher_key_size(), pgp_load_digest(), px_md_free, PXE_PGP_BAD_S2K_MODE, PXE_PGP_UNSUPPORTED_CIPHER, and res.
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, res, 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 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_pubkey | ( | PGP_Context * | ctx, |
MBuf * | keypkt, | ||
const uint8 * | key, | ||
int | key_len, | ||
int | pubtype | ||
) |
Definition at line 565 of file pgp-pubkey.c.
References internal_read_key(), sort-test::key, PGP_Context::pub_key, pullf_create_mbuf_reader(), pullf_free(), and res.
Referenced by decrypt_internal(), and encrypt_internal().
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().
int pgp_skip_packet | ( | PullFilter * | pkt | ) |
Definition at line 1064 of file pgp-decrypt.c.
References pullf_read(), and res.
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(), err(), 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(), PXE_BUG, and res.
Referenced by pgp_encrypt().
|
extern |
Definition at line 298 of file pgp-decrypt.c.
Referenced by parse_symenc_data(), parse_symenc_mdc_data(), and process_secret_key().