X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=crypto%2Fcrypto.c;h=aee2556de1fcde705642944110a78a5bdd6cd1de;hb=refs%2Fheads%2Fmaster;hp=ee89f0e8abe2be9b512eb4dad08273c70efe877d;hpb=7ed5ab23c04b08d569a8515b2eab39338eddd261;p=chiark-tcl.git diff --git a/crypto/crypto.c b/crypto/crypto.c index ee89f0e..6efea24 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -1,6 +1,6 @@ /* * crypto - Tcl bindings for parts of the `nettle' crypto library - * Copyright 2006 Ian Jackson + * Copyright 2006-2012 Ian Jackson * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -13,9 +13,7 @@ * General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301, USA. + * along with this library; if not, see . */ @@ -147,15 +145,6 @@ int cht_do_padmethodinfo_pkcs5(ClientData cd, Tcl_Interp *ip, int *ok) { return TCL_OK; } -int cht_do_hbcrypto_hash(ClientData cd, Tcl_Interp *ip, const HashAlgInfo *alg, - HBytes_Value message, HBytes_Value *result) { - Byte *dest; - - dest= cht_hb_arrayspace(result,alg->hashsize); - alg->oneshot(dest, cht_hb_data(&message), cht_hb_len(&message)); - return TCL_OK; -} - #define OBJ_CIPHKEY(o) ((CiphKeyValue*)(o)->internalRep.otherValuePtr) typedef struct { @@ -263,6 +252,14 @@ static int blockcipher_prep(Tcl_Interp *ip, Tcl_Obj *key_obj, int rc; CiphKeyValue *key; + /* placate gcc, see Debian #968734 */ + *key_r= 0; + *sched_r= 0; + *iv_r= 0; + *iv_lenbytes_r= 0; + *buffers_r= 0; + *nblocks_r= 0; + if (data_len % alg->blocksize) return cht_staticerr(ip, "block cipher input not whole number of blocks", "HBYTES BLOCKCIPHER LENGTH");