Commit 9bf81247 authored by Vijay Kiran Kamuju's avatar Vijay Kiran Kamuju Committed by Alexandre Julliard

msasn1: Add stub for ASN1_CloseDecoder function.

parent fc2c1b5d
......@@ -185,3 +185,8 @@ ASN1error_e WINAPI ASN1_CreateDecoder(ASN1module_t module, ASN1decoding_t *decod
return ASN1_SUCCESS;
}
void WINAPI ASN1_CloseDecoder(ASN1decoding_t decoder)
{
FIXME("(%p): Stub!\n", decoder);
}
......@@ -216,7 +216,7 @@
@ stub ASN1PEREncUnsignedShort
@ stub ASN1PEREncZero
@ stub ASN1PERFreeSeqOf
@ stub ASN1_CloseDecoder
@ stdcall ASN1_CloseDecoder(ptr)
@ stub ASN1_CloseEncoder2
@ stdcall ASN1_CloseEncoder(ptr)
@ stdcall ASN1_CloseModule(ptr)
......
......@@ -261,6 +261,7 @@ static void test_CreateDecoder(void)
ok(!decoder->pos,"Got incorrect pos = %p.\n",decoder->pos);
ok(decoder->eRule == ASN1_BER_RULE_DER,"Got incorrect eRule = %08x.\n",decoder->eRule);
ok(decoder->dwFlags == ASN1DECODE_NOASSERT,"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 0, NULL);
ok(ASN1_SUCCEEDED(ret),"Got error code %d.\n",ret);
......@@ -276,6 +277,7 @@ static void test_CreateDecoder(void)
ok(decoder->pos==buf,"Got incorrect pos = %s.\n",decoder->pos);
ok(decoder->eRule == ASN1_BER_RULE_DER,"Got incorrect eRule = %08x.\n",decoder->eRule);
ok(decoder->dwFlags == (ASN1DECODE_NOASSERT|ASN1DECODE_SETBUFFER), "Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 2, NULL);
ok(ASN1_SUCCEEDED(ret),"Got error code %d.\n",ret);
......@@ -291,6 +293,7 @@ static void test_CreateDecoder(void)
ok(decoder->pos==buf,"Got incorrect pos = %p.\n",decoder->pos);
ok(decoder->eRule == ASN1_BER_RULE_DER,"Got incorrect eRule = %08x.\n",decoder->eRule);
ok(decoder->dwFlags == (ASN1DECODE_NOASSERT|ASN1DECODE_SETBUFFER),"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 4, NULL);
ok(ASN1_SUCCEEDED(ret),"Got error code %d.\n",ret);
......@@ -306,14 +309,17 @@ static void test_CreateDecoder(void)
ok(decoder->pos==buf,"Got incorrect pos = %p.\n",decoder->pos);
ok(decoder->eRule == ASN1_BER_RULE_DER,"Got incorrect rule = %08x.\n",decoder->eRule);
ok(decoder->dwFlags == (ASN1DECODE_NOASSERT|ASN1DECODE_SETBUFFER),"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ASN1_CloseModule(mod);
mod = ASN1_CreateModule(ASN1_THIS_VERSION, ASN1_BER_RULE_DER, ASN1FLAGS_NONE, 1, encfn, decfn, freefn, size, name);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 0, NULL);
ok(decoder->dwFlags == ASN1DECODE_SETBUFFER,"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 4, NULL);
ok(decoder->dwFlags == ASN1DECODE_SETBUFFER,"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ASN1_CloseModule(mod);
mod = ASN1_CreateModule(ASN1_THIS_VERSION, ASN1_PER_RULE_ALIGNED, ASN1FLAGS_NOASSERT, 1, encfn, decfn, freefn, size, name);
......@@ -331,6 +337,7 @@ static void test_CreateDecoder(void)
ok(decoder->pos==buf,"Got incorrect pos = %s.\n",decoder->pos);
ok(decoder->eRule == ASN1_PER_RULE_ALIGNED,"Got incorrect eRule = %08x.\n",decoder->eRule);
ok(decoder->dwFlags == (ASN1DECODE_NOASSERT|ASN1DECODE_SETBUFFER),"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 4, NULL);
ok(!!decoder,"Decoder creation failed.\n");
......@@ -345,14 +352,17 @@ static void test_CreateDecoder(void)
ok(decoder->pos==buf,"Got incorrect pos = %p.\n",decoder->pos);
ok(decoder->eRule == ASN1_PER_RULE_ALIGNED,"Got incorrect rule = %08x.\n",decoder->eRule);
ok(decoder->dwFlags == (ASN1FLAGS_NOASSERT|ASN1DECODE_SETBUFFER),"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ASN1_CloseModule(mod);
mod = ASN1_CreateModule(ASN1_THIS_VERSION, ASN1_PER_RULE_ALIGNED, ASN1FLAGS_NONE, 1, encfn, decfn, freefn, size, name);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 0, NULL);
ok(decoder->dwFlags == ASN1DECODE_SETBUFFER,"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ret = ASN1_CreateDecoder(mod, &decoder, buf, 4, NULL);
ok(decoder->dwFlags == ASN1DECODE_SETBUFFER,"Got incorrect dwFlags = %08x.\n",decoder->dwFlags);
ASN1_CloseDecoder(decoder);
ASN1_CloseModule(mod);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment