=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/ssh-keysign.c,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -u -r1.20 -r1.20.2.1 --- src/usr.bin/ssh/ssh-keysign.c 2006/02/08 12:15:27 1.20 +++ src/usr.bin/ssh/ssh-keysign.c 2006/09/30 04:06:51 1.20.2.1 @@ -1,3 +1,4 @@ +/* $OpenBSD: ssh-keysign.c,v 1.20.2.1 2006/09/30 04:06:51 brad Exp $ */ /* * Copyright (c) 2002 Markus Friedl. All rights reserved. * @@ -21,23 +22,27 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "includes.h" -RCSID("$OpenBSD: ssh-keysign.c,v 1.20 2006/02/08 12:15:27 stevesk Exp $"); -#include +#include #include #include #include +#include +#include +#include +#include +#include +#include + +#include "xmalloc.h" #include "log.h" #include "key.h" #include "ssh.h" #include "ssh2.h" #include "misc.h" -#include "xmalloc.h" #include "buffer.h" -#include "bufaux.h" #include "authfile.h" #include "msg.h" #include "canohost.h" @@ -64,9 +69,9 @@ buffer_init(&b); buffer_append(&b, data, datalen); - /* session id, currently limited to SHA1 (20 bytes) */ + /* session id, currently limited to SHA1 (20 bytes) or SHA256 (32) */ p = buffer_get_string(&b, &len); - if (len != 20) + if (len != 20 && len != 32) fail++; xfree(p);