diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-03-28 16:25:02 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-03-28 16:25:02 +0100 |
commit | 70ff826d50692002298e5f171564c31cd5782d42 (patch) | |
tree | 60a8acd025bc8722f595095857443658cf6f6ce2 /lgl | |
parent | 97214ea141f42fcabd899b7c7f1589be68e4604e (diff) | |
download | gnutls-70ff826d50692002298e5f171564c31cd5782d42.tar.gz |
Update gnulib files.
Diffstat (limited to 'lgl')
-rw-r--r-- | lgl/gc-libgcrypt.c | 20 | ||||
-rw-r--r-- | lgl/gc.h | 12 |
2 files changed, 24 insertions, 8 deletions
diff --git a/lgl/gc-libgcrypt.c b/lgl/gc-libgcrypt.c index 73c81254ea..2affba09a3 100644 --- a/lgl/gc-libgcrypt.c +++ b/lgl/gc-libgcrypt.c @@ -2,8 +2,8 @@ * Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 Simon Josefsson * * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1, or (at your + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your * option) any later version. * * This file is distributed in the hope that it will be useful, but @@ -11,7 +11,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with this file; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. @@ -294,6 +294,10 @@ gc_hash_open (Gc_hash hash, Gc_hash_mode mode, gc_hash_handle * outhandle) gcryalg = GCRY_MD_SHA512; break; + case GC_SHA224: + gcryalg = GCRY_MD_SHA224; + break; + case GC_RMD160: gcryalg = GCRY_MD_RMD160; break; @@ -393,6 +397,10 @@ gc_hash_digest_length (Gc_hash hash) len = GC_SHA512_DIGEST_SIZE; break; + case GC_SHA224: + len = GC_SHA224_DIGEST_SIZE; + break; + default: return 0; } @@ -508,6 +516,12 @@ gc_hash_buffer (Gc_hash hash, const void *in, size_t inlen, char *resbuf) break; #endif +#ifdef GNULIB_GC_SHA224 + case GC_SHA224: + gcryalg = GCRY_MD_SHA224; + break; +#endif + #ifdef GNULIB_GC_RMD160 case GC_RMD160: gcryalg = GCRY_MD_RMD160; @@ -1,9 +1,9 @@ /* gc.h --- Header file for implementation agnostic crypto wrapper API. - * Copyright (C) 2002, 2003, 2004, 2005, 2007 Simon Josefsson + * Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008 Simon Josefsson * * This file is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published - * by the Free Software Foundation; either version 2.1, or (at your + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your * option) any later version. * * This file is distributed in the hope that it will be useful, but @@ -11,7 +11,7 @@ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public License + * You should have received a copy of the GNU General Public License * along with this file; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * 02110-1301, USA. @@ -48,7 +48,8 @@ enum Gc_hash GC_RMD160, GC_SHA256, GC_SHA384, - GC_SHA512 + GC_SHA512, + GC_SHA224 }; typedef enum Gc_hash Gc_hash; @@ -68,6 +69,7 @@ typedef void *gc_hash_handle; #define GC_SHA256_DIGEST_SIZE 32 #define GC_SHA384_DIGEST_SIZE 48 #define GC_SHA512_DIGEST_SIZE 64 +#define GC_SHA224_DIGEST_SIZE 24 /* Cipher types. */ enum Gc_cipher |