X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/blobdiff_plain/51e9d3c00a3471f284e89ec1f59f38ca25f10c5f..e94b1ec49475425f8fa8002b405ae8c5a3e3b31b:/sshblowf.c diff --git a/sshblowf.c b/sshblowf.c index eeb7c27a..a264c3c5 100644 --- a/sshblowf.c +++ b/sshblowf.c @@ -389,6 +389,7 @@ static void blowfish_msb_decrypt_cbc(unsigned char *blk, int len, ctx->iv1 = iv1; } +#ifdef ENABLE_BLOWFISH_SSH2_CTR static void blowfish_msb_sdctr(unsigned char *blk, int len, BlowfishContext * ctx) { @@ -414,6 +415,7 @@ static void blowfish_msb_sdctr(unsigned char *blk, int len, ctx->iv0 = iv0; ctx->iv1 = iv1; } +#endif static void blowfish_setkey(BlowfishContext * ctx, const unsigned char *key, short keybytes) @@ -500,11 +502,13 @@ static void blowfish_key(void *handle, unsigned char *key) blowfish_setkey(ctx, key, 16); } +#ifdef ENABLE_BLOWFISH_SSH2_CTR static void blowfish256_key(void *handle, unsigned char *key) { BlowfishContext *ctx = (BlowfishContext *)handle; blowfish_setkey(ctx, key, 32); } +#endif static void blowfish_iv(void *handle, unsigned char *key) { @@ -550,12 +554,14 @@ static void blowfish_ssh2_decrypt_blk(void *handle, unsigned char *blk, blowfish_msb_decrypt_cbc(blk, len, ctx); } +#ifdef ENABLE_BLOWFISH_SSH2_CTR static void blowfish_ssh2_sdctr(void *handle, unsigned char *blk, int len) { BlowfishContext *ctx = (BlowfishContext *)handle; blowfish_msb_sdctr(blk, len, ctx); } +#endif const struct ssh_cipher ssh_blowfish_ssh1 = { blowfish_ssh1_make_context, blowfish_free_context, blowfish_sesskey, @@ -570,12 +576,14 @@ static const struct ssh2_cipher ssh_blowfish_ssh2 = { 8, 128, "Blowfish-128 CBC" }; +#ifdef ENABLE_BLOWFISH_SSH2_CTR static const struct ssh2_cipher ssh_blowfish_ssh2_ctr = { blowfish_make_context, blowfish_free_context, blowfish_iv, blowfish256_key, blowfish_ssh2_sdctr, blowfish_ssh2_sdctr, "blowfish-ctr", 8, 256, "Blowfish-256 SDCTR" }; +#endif /* * "blowfish-ctr" is disabled because it hasn't had any interoperability @@ -584,7 +592,9 @@ static const struct ssh2_cipher ssh_blowfish_ssh2_ctr = { * builds. */ static const struct ssh2_cipher *const blowfish_list[] = { -/* &ssh_blowfish_ssh2_ctr, */ +#ifdef ENABLE_BLOWFISH_SSH2_CTR + &ssh_blowfish_ssh2_ctr, +#endif &ssh_blowfish_ssh2 };