diff options
Diffstat (limited to 'contrib/pgcrypto')
-rw-r--r-- | contrib/pgcrypto/internal.c | 19 | ||||
-rw-r--r-- | contrib/pgcrypto/pgp-decrypt.c | 7 | ||||
-rw-r--r-- | contrib/pgcrypto/pgp-encrypt.c | 2 | ||||
-rw-r--r-- | contrib/pgcrypto/pgp.h | 2 |
4 files changed, 7 insertions, 23 deletions
diff --git a/contrib/pgcrypto/internal.c b/contrib/pgcrypto/internal.c index 16dfe725eae..db58408d4c7 100644 --- a/contrib/pgcrypto/internal.c +++ b/contrib/pgcrypto/internal.c @@ -39,25 +39,6 @@ #include "blf.h" #include "rijndael.h" -/* - * System reseeds should be separated at least this much. - */ -#define SYSTEM_RESEED_MIN (20*60) /* 20 min */ -/* - * How often to roll dice. - */ -#define SYSTEM_RESEED_CHECK_TIME (10*60) /* 10 min */ -/* - * The chance is x/256 that the reseed happens. - */ -#define SYSTEM_RESEED_CHANCE (4) /* 256/4 * 10min ~ 10h */ - -/* - * If this much time has passed, force reseed. - */ -#define SYSTEM_RESEED_MAX (12*60*60) /* 12h */ - - #ifndef MD5_DIGEST_LENGTH #define MD5_DIGEST_LENGTH 16 #endif diff --git a/contrib/pgcrypto/pgp-decrypt.c b/contrib/pgcrypto/pgp-decrypt.c index eed0f6ad2d5..4c43eb7e3ef 100644 --- a/contrib/pgcrypto/pgp-decrypt.c +++ b/contrib/pgcrypto/pgp-decrypt.c @@ -423,7 +423,7 @@ static struct PullFilterOps mdc_filter = { /* * Combined Pkt reader and MDC hasher. * - * For the case of SYMENCRYPTED_MDC packet, where + * For the case of SYMENCRYPTED_DATA_MDC packet, where * the data part has 'context length', which means * that data packet ends 22 bytes before end of parent * packet, which is silly. @@ -894,7 +894,10 @@ process_data_packets(PGP_Context *ctx, MBuf *dst, PullFilter *src, break; } - /* context length inside SYMENC_MDC needs special handling */ + /* + * Context length inside SYMENCRYPTED_DATA_MDC packet needs special + * handling. + */ if (need_mdc && res == PKT_CONTEXT) res = pullf_create(&pkt, &mdcbuf_filter, ctx, src); else diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c index 8a6cd826755..2938b4b3f5e 100644 --- a/contrib/pgcrypto/pgp-encrypt.c +++ b/contrib/pgcrypto/pgp-encrypt.c @@ -618,7 +618,7 @@ pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst) goto out; /* - * initialize symkey + * initialize sym_key */ if (ctx->sym_key) { diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h index 7c97fa398fa..f338523b7a6 100644 --- a/contrib/pgcrypto/pgp.h +++ b/contrib/pgcrypto/pgp.h @@ -279,7 +279,7 @@ int pgp_s2k_process(PGP_S2K *s2k, int cipher, const uint8 *key, int klen); typedef struct PGP_CFB PGP_CFB; int pgp_cfb_create(PGP_CFB **ctx_p, int algo, - const uint8 *key, int key_len, int recync, uint8 *iv); + const uint8 *key, int key_len, int resync, uint8 *iv); void pgp_cfb_free(PGP_CFB *ctx); int pgp_cfb_encrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst); int pgp_cfb_decrypt(PGP_CFB *ctx, const uint8 *data, int len, uint8 *dst); |