Deleted Added
sdiff udiff text old ( 181111 ) new ( 221420 )
full compact
1/* $OpenBSD: cipher-bf1.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */
2/*
3 * Copyright (c) 2003 Markus Friedl. All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.

--- 61 unchanged lines hidden (view full) ---

71 memcpy (&(ctx->oiv[0]), iv, 8);
72 memcpy (&(ctx->iv[0]), &(ctx->oiv[0]), 8);
73 if (key != NULL)
74 BF_set_key (&(ctx->c.bf_ks), EVP_CIPHER_CTX_key_length (ctx),
75 key);
76}
77#endif
78
79static int (*orig_bf)(EVP_CIPHER_CTX *, u_char *, const u_char *, u_int) = NULL;
80
81static int
82bf_ssh1_cipher(EVP_CIPHER_CTX *ctx, u_char *out, const u_char *in, u_int len)
83{
84 int ret;
85
86 swap_bytes(in, out, len);
87 ret = (*orig_bf)(ctx, out, out, len);
88 swap_bytes(out, out, len);
89 return (ret);
90}

--- 16 unchanged lines hidden ---