diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-09-06 12:01:35 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-09-06 12:01:35 +0000 |
commit | 8a283b30c6ad7e23b600fda0487279c10cd9dfce (patch) | |
tree | bb7e3e207126ba3685e38dc259fa4ec15af59d6e /usr.bin/ssh | |
parent | ee9c6baa713a6c3c0af47c247361c6c54f12a0b6 (diff) |
adapt to sha2(3) API changes; ok millert@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r-- | usr.bin/ssh/md-sha256.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/ssh/md-sha256.c b/usr.bin/ssh/md-sha256.c index 98597c49762..0d337baa8a5 100644 --- a/usr.bin/ssh/md-sha256.c +++ b/usr.bin/ssh/md-sha256.c @@ -1,4 +1,4 @@ -/* $OpenBSD: md-sha256.c,v 1.5 2006/08/03 03:34:42 deraadt Exp $ */ +/* $OpenBSD: md-sha256.c,v 1.6 2008/09/06 12:01:34 djm Exp $ */ /* * Copyright (c) 2005 Damien Miller <djm@openbsd.org> * @@ -29,28 +29,28 @@ const EVP_MD *evp_ssh_sha256(void); static int ssh_sha256_init(EVP_MD_CTX *ctxt) { - SHA256_Init(ctxt->md_data); + SHA256Init(ctxt->md_data); return (1); } static int ssh_sha256_update(EVP_MD_CTX *ctxt, const void *data, unsigned long len) { - SHA256_Update(ctxt->md_data, data, len); + SHA256Update(ctxt->md_data, data, len); return (1); } static int ssh_sha256_final(EVP_MD_CTX *ctxt, unsigned char *digest) { - SHA256_Final(digest, ctxt->md_data); + SHA256Final(digest, ctxt->md_data); return (1); } static int ssh_sha256_cleanup(EVP_MD_CTX *ctxt) { - memset(ctxt->md_data, 0, sizeof(SHA256_CTX)); + memset(ctxt->md_data, 0, sizeof(SHA2_CTX)); return (1); } @@ -67,7 +67,7 @@ evp_ssh_sha256(void) ssh_sha256.final = ssh_sha256_final; ssh_sha256.cleanup = ssh_sha256_cleanup; ssh_sha256.block_size = SHA256_BLOCK_LENGTH; - ssh_sha256.ctx_size = sizeof(SHA256_CTX); + ssh_sha256.ctx_size = sizeof(SHA2_CTX); return (&ssh_sha256); } |