]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
removed unneeded code.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 8 Oct 2010 06:24:42 +0000 (08:24 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Fri, 8 Oct 2010 06:24:42 +0000 (08:24 +0200)
libextra/fipsmd5.c

index b5482e716b38883cb6644d2dea74a836f09698eb..801289aadc7207d6910ff399a27d889216b9c358 100644 (file)
@@ -132,40 +132,6 @@ hmacmd5hash (void *ctx, const void *text, size_t textsize)
   return 0;
 }
 
-static int
-hmacmd5copy (void **dst_ctx, void *src_ctx)
-{
-  struct hmacctx *p = src_ctx;
-  struct hmacctx *q;
-
-  q = gnutls_malloc (sizeof (struct hmacctx));
-  if (!q)
-    return -1;
-
-  q->data = gnutls_malloc (p->datasize);
-  if (!q->data)
-    {
-      gnutls_free (q);
-      return -1;
-    }
-  memcpy (q->data, p->data, p->datasize);
-  q->datasize = p->datasize;
-
-  q->key = gnutls_malloc (p->keysize);
-  if (!q->key)
-    {
-      gnutls_free (q);
-      gnutls_free (q->data);
-      return -1;
-    }
-  memcpy (q->key, p->key, p->keysize);
-  q->keysize = p->keysize;
-
-  *dst_ctx = q;
-
-  return 0;
-}
-
 static int
 hmacmd5output (void *ctx, void *digest, size_t digestsize)
 {
@@ -207,7 +173,6 @@ static gnutls_crypto_mac_st mac = {
   .init = hmacmd5init,
   .setkey = hmacmd5setkey,
   .hash = hmacmd5hash,
-  .copy = hmacmd5copy,
   .output = hmacmd5output,
   .deinit = hmacmd5deinit
 };