summaryrefslogtreecommitdiff
path: root/contrib/pgcrypto/pgp-encrypt.c
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2016-03-09 14:31:07 -0300
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2016-03-09 14:31:07 -0300
commit188f359d39ed65b5f3ddc1f397140fb9d153e61a (patch)
tree19a88335d343b90f501f0d17a67947e52e2c0413 /contrib/pgcrypto/pgp-encrypt.c
parentb6fb6471f6afaf649e52f38269fd8c5c60647669 (diff)
downloadpostgresql-188f359d39ed65b5f3ddc1f397140fb9d153e61a.tar.gz
pgcrypto: support changing S2K iteration count
pgcrypto already supports key-stretching during symmetric encryption, including the salted-and-iterated method; but the number of iterations was not configurable. This commit implements a new s2k-count parameter to pgp_sym_encrypt() which permits selecting a larger number of iterations. Author: Jeff Janes
Diffstat (limited to 'contrib/pgcrypto/pgp-encrypt.c')
-rw-r--r--contrib/pgcrypto/pgp-encrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/pgcrypto/pgp-encrypt.c b/contrib/pgcrypto/pgp-encrypt.c
index 2320c7574b..c9148fd2fc 100644
--- a/contrib/pgcrypto/pgp-encrypt.c
+++ b/contrib/pgcrypto/pgp-encrypt.c
@@ -567,7 +567,7 @@ init_s2k_key(PGP_Context *ctx)
if (ctx->s2k_cipher_algo < 0)
ctx->s2k_cipher_algo = ctx->cipher_algo;
- res = pgp_s2k_fill(&ctx->s2k, ctx->s2k_mode, ctx->s2k_digest_algo);
+ res = pgp_s2k_fill(&ctx->s2k, ctx->s2k_mode, ctx->s2k_digest_algo, ctx->s2k_count);
if (res < 0)
return res;