]> granicus.if.org Git - openssl/commitdiff
Zero key-length for HMAC is apparently OK.
authorAndy Polyakov <appro@openssl.org>
Sun, 25 Jul 2004 20:24:49 +0000 (20:24 +0000)
committerAndy Polyakov <appro@openssl.org>
Sun, 25 Jul 2004 20:24:49 +0000 (20:24 +0000)
crypto/hmac/hmac.c

index b1aa05b2eaa5b2b2e3a8cbc79f81307286b05f47..16d95e08d52f44cf008f1911291b5308f07ec1f9 100644 (file)
@@ -89,7 +89,7 @@ void HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
                        }
                else
                        {
-                       OPENSSL_assert(len>0 && len <= (int)sizeof(ctx->key));
+                       OPENSSL_assert(len>=0 && len<=(int)sizeof(ctx->key));
                        memcpy(ctx->key,key,len);
                        ctx->key_length=len;
                        }