1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Fix inconsistencies and typos in the tree, take 10

This addresses some issues with unnecessary code comments, fixes various
typos in docs and comments, and removes some orphaned structures and
definitions.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/9aabc775-5494-b372-8bcb-4dfc0bd37c68@gmail.com
This commit is contained in:
Michael Paquier
2019-08-13 13:53:41 +09:00
parent 2d7d67cc74
commit 66bde49d96
74 changed files with 93 additions and 141 deletions

View File

@ -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

View File

@ -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

View File

@ -618,7 +618,7 @@ pgp_encrypt(PGP_Context *ctx, MBuf *src, MBuf *dst)
goto out;
/*
* initialize symkey
* initialize sym_key
*/
if (ctx->sym_key)
{

View File

@ -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);