Add -hmac option to dgst from 0.9.7 stable branch.
[openssl.git] / crypto / evp / bio_md.c
index a6d35d8bda3436659977eb58bea8dd574fdf8ae0..f4c0a7298101d0a3e4ab2aff67110ab2cc4c9c25 100644 (file)
@@ -196,6 +196,12 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
                *pctx=ctx;
                b->init = 1;
                break;
+       case BIO_C_SET_MD_CTX:
+               if (b->init)
+                       b->ptr=ptr;
+               else
+                       ret=0;
+               break;
        case BIO_C_DO_STATE_MACHINE:
                BIO_clear_retry_flags(b);
                ret=BIO_ctrl(b->next_bio,cmd,num,ptr);