Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
8b0e2677
Commit
8b0e2677
authored
May 07, 2020
by
Vijay Kiran Kamuju
Committed by
Alexandre Julliard
May 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msasn1: Add partial implementation of ASN1_CreateEncoder.
Signed-off-by:
Vijay Kiran Kamuju
<
infyquest@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
54b237bc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
195 additions
and
14 deletions
+195
-14
main.c
dlls/msasn1/main.c
+46
-0
msasn1.spec
dlls/msasn1/msasn1.spec
+1
-1
asn1.c
dlls/msasn1/tests/asn1.c
+148
-13
No files found.
dlls/msasn1/main.c
View file @
8b0e2677
/*
* Copyright 2014 Austin English
* Copyright 2020 Vijay Kiran Kamuju
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
...
...
@@ -91,3 +92,48 @@ void WINAPI ASN1_CloseModule(ASN1module_t module)
heap_free
(
module
);
}
ASN1error_e
WINAPI
ASN1_CreateEncoder
(
ASN1module_t
module
,
ASN1encoding_t
*
encoder
,
ASN1octet_t
*
buf
,
ASN1uint32_t
bufsize
,
ASN1encoding_t
parent
)
{
ASN1encoding_t
enc
;
TRACE
(
"(%p %p %p %u %p)
\n
"
,
module
,
encoder
,
buf
,
bufsize
,
parent
);
if
(
!
module
||
!
encoder
)
return
ASN1_ERR_BADARGS
;
enc
=
heap_alloc
(
sizeof
(
enc
));
if
(
!
enc
)
{
return
ASN1_ERR_MEMORY
;
}
if
(
parent
)
FIXME
(
"parent not implemented.
\n
"
);
enc
->
magic
=
0x44434e45
;
enc
->
version
=
0
;
enc
->
module
=
module
;
enc
->
buf
=
0
;
enc
->
size
=
0
;
enc
->
len
=
0
;
enc
->
err
=
ASN1_SUCCESS
;
enc
->
bit
=
0
;
enc
->
pos
=
0
;
enc
->
cbExtraHeader
=
0
;
enc
->
eRule
=
module
->
eRule
;
enc
->
dwFlags
=
module
->
dwFlags
;
if
(
buf
&&
bufsize
)
{
enc
->
buf
=
buf
;
enc
->
pos
=
buf
;
enc
->
size
=
bufsize
;
enc
->
dwFlags
|=
ASN1ENCODE_SETBUFFER
;
}
*
encoder
=
enc
;
return
ASN1_SUCCESS
;
}
dlls/msasn1/msasn1.spec
View file @
8b0e2677
...
...
@@ -222,7 +222,7 @@
@ stdcall ASN1_CloseModule(ptr)
@ stub ASN1_CreateDecoder
@ stub ASN1_CreateDecoderEx
@ st
ub ASN1_CreateEncoder
@ st
dcall ASN1_CreateEncoder(ptr ptr ptr long ptr)
@ stdcall ASN1_CreateModule(long long long long ptr ptr ptr ptr long)
@ stub ASN1_Decode
@ stub ASN1_Encode
...
...
dlls/msasn1/tests/asn1.c
View file @
8b0e2677
...
...
@@ -47,22 +47,22 @@ static void test_CreateModule(void)
mod
=
ASN1_CreateModule
(
0
,
0
,
0
,
0
,
encfn
,
decfn
,
freefn
,
size
,
0
);
ok
(
!!
mod
,
"Failed to create module.
\n
"
);
ok
(
mod
->
nModuleName
==
0
,
"Got Module name = %d
\n
.
"
,
mod
->
nModuleName
);
ok
(
mod
->
eRule
==
0
,
"Got eRule = %08x
\n
.
"
,
mod
->
eRule
);
ok
(
mod
->
dwFlags
==
0
,
"Got Flags = %08x
\n
.
"
,
mod
->
dwFlags
);
ok
(
mod
->
cPDUs
==
0
,
"Got PDUs = %08x
\n
.
"
,
mod
->
cPDUs
);
ok
(
mod
->
nModuleName
==
0
,
"Got Module name = %d
.
\n
"
,
mod
->
nModuleName
);
ok
(
mod
->
eRule
==
0
,
"Got eRule = %08x
.
\n
"
,
mod
->
eRule
);
ok
(
mod
->
dwFlags
==
0
,
"Got Flags = %08x
.
\n
"
,
mod
->
dwFlags
);
ok
(
mod
->
cPDUs
==
0
,
"Got PDUs = %08x
.
\n
"
,
mod
->
cPDUs
);
ok
(
mod
->
apfnFreeMemory
==
freefn
,
"Free function = %p.
\n
"
,
mod
->
apfnFreeMemory
);
ok
(
mod
->
acbStructSize
==
size
,
"Struct size = %p.
\n
"
,
mod
->
acbStructSize
);
ok
(
!
mod
->
PER
.
apfnEncoder
,
"Encoder function should not be s
et.
\n
"
);
ok
(
!
mod
->
PER
.
apfnEncoder
,
"Encoder function should not be set.
\n
"
);
ok
(
!
mod
->
PER
.
apfnDecoder
,
"Decoder function should not be set.
\n
"
);
ASN1_CloseModule
(
mod
);
mod
=
ASN1_CreateModule
(
ASN1_THIS_VERSION
,
ASN1_BER_RULE_DER
,
ASN1FLAGS_NOASSERT
,
1
,
encfn
,
decfn
,
freefn
,
size
,
name
);
ok
(
!!
mod
,
"Failed to create module.
\n
"
);
ok
(
mod
->
nModuleName
==
name
,
"Got Module name = %d
\n
.
"
,
mod
->
nModuleName
);
ok
(
mod
->
eRule
==
ASN1_BER_RULE_DER
,
"Got eRule = %08x
\n
.
"
,
mod
->
eRule
);
ok
(
mod
->
cPDUs
==
1
,
"Got PDUs = %08x
\n
.
"
,
mod
->
cPDUs
);
ok
(
mod
->
dwFlags
==
ASN1FLAGS_NOASSERT
,
"Got Flags = %08x
\n
.
"
,
mod
->
dwFlags
);
ok
(
mod
->
nModuleName
==
name
,
"Got Module name = %d
.
\n
"
,
mod
->
nModuleName
);
ok
(
mod
->
eRule
==
ASN1_BER_RULE_DER
,
"Got eRule = %08x
.
\n
"
,
mod
->
eRule
);
ok
(
mod
->
cPDUs
==
1
,
"Got PDUs = %08x
.
\n
"
,
mod
->
cPDUs
);
ok
(
mod
->
dwFlags
==
ASN1FLAGS_NOASSERT
,
"Got Flags = %08x
.
\n
"
,
mod
->
dwFlags
);
ok
(
mod
->
apfnFreeMemory
==
freefn
,
"Free function = %p.
\n
"
,
mod
->
apfnFreeMemory
);
ok
(
mod
->
acbStructSize
==
size
,
"Struct size = %p.
\n
"
,
mod
->
acbStructSize
);
ok
(
mod
->
BER
.
apfnEncoder
==
(
ASN1BerEncFun_t
*
)
encfn
,
"Encoder function = %p.
\n
"
,
mod
->
BER
.
apfnEncoder
);
...
...
@@ -71,10 +71,10 @@ static void test_CreateModule(void)
mod
=
ASN1_CreateModule
(
ASN1_THIS_VERSION
,
ASN1_PER_RULE_ALIGNED
,
ASN1FLAGS_NOASSERT
,
1
,
encfn
,
decfn
,
freefn
,
size
,
name
);
ok
(
!!
mod
,
"Failed to create module.
\n
"
);
ok
(
mod
->
nModuleName
==
name
,
"Got Module name = %d
\n
.
"
,
mod
->
nModuleName
);
ok
(
mod
->
eRule
==
ASN1_PER_RULE_ALIGNED
,
"Got eRule = %08x
\n
.
"
,
mod
->
eRule
);
ok
(
mod
->
cPDUs
==
1
,
"Got PDUs = %08x
\n
.
"
,
mod
->
cPDUs
);
ok
(
mod
->
dwFlags
==
ASN1FLAGS_NOASSERT
,
"Got Flags = %08x
\n
.
"
,
mod
->
dwFlags
);
ok
(
mod
->
nModuleName
==
name
,
"Got Module name = %d
.
\n
"
,
mod
->
nModuleName
);
ok
(
mod
->
eRule
==
ASN1_PER_RULE_ALIGNED
,
"Got eRule = %08x
.
\n
"
,
mod
->
eRule
);
ok
(
mod
->
cPDUs
==
1
,
"Got PDUs = %08x
.
\n
"
,
mod
->
cPDUs
);
ok
(
mod
->
dwFlags
==
ASN1FLAGS_NOASSERT
,
"Got Flags = %08x
.
\n
"
,
mod
->
dwFlags
);
ok
(
mod
->
apfnFreeMemory
==
freefn
,
"Free function = %p.
\n
"
,
mod
->
apfnFreeMemory
);
ok
(
mod
->
acbStructSize
==
size
,
"Struct size = %p.
\n
"
,
mod
->
acbStructSize
);
ok
(
mod
->
PER
.
apfnEncoder
==
(
ASN1PerEncFun_t
*
)
encfn
/* WINXP & WIN2008 */
||
...
...
@@ -84,7 +84,142 @@ static void test_CreateModule(void)
ASN1_CloseModule
(
mod
);
}
static
void
test_CreateEncoder
(
void
)
{
const
ASN1GenericFun_t
encfn
[]
=
{
NULL
};
const
ASN1GenericFun_t
decfn
[]
=
{
NULL
};
const
ASN1FreeFun_t
freefn
[]
=
{
NULL
};
const
ASN1uint32_t
size
[]
=
{
0
};
ASN1magic_t
name
=
0x61736e31
;
ASN1encoding_t
encoder
=
NULL
;
ASN1octet_t
buf
[]
=
{
0x54
,
0x65
,
0x73
,
0x74
,
0
};
ASN1module_t
mod
;
ASN1error_e
ret
;
ret
=
ASN1_CreateEncoder
(
NULL
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
ret
==
ASN1_ERR_BADARGS
,
"Got error code %d.
\n
"
,
ret
);
mod
=
ASN1_CreateModule
(
ASN1_THIS_VERSION
,
ASN1_BER_RULE_DER
,
ASN1FLAGS_NOASSERT
,
1
,
encfn
,
decfn
,
freefn
,
size
,
name
);
ret
=
ASN1_CreateEncoder
(
mod
,
NULL
,
NULL
,
0
,
NULL
);
ok
(
ret
==
ASN1_ERR_BADARGS
,
"Got error code %d.
\n
"
,
ret
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
NULL
,
0
,
NULL
);
ok
(
ASN1_SUCCEEDED
(
ret
),
"Got error code %d.
\n
"
,
ret
);
ok
(
!!
encoder
,
"Encoder creation failed.
\n
"
);
ok
(
encoder
->
magic
==
0x44434e45
,
"Got invalid magic = %08x.
\n
"
,
encoder
->
magic
);
ok
(
!
encoder
->
version
,
"Got incorrect version = %08x.
\n
"
,
encoder
->
version
);
ok
(
encoder
->
module
==
mod
,
"Got incorrect module = %p.
\n
"
,
encoder
->
module
);
ok
(
!
encoder
->
buf
,
"Got incorrect buf = %p.
\n
"
,
encoder
->
buf
);
ok
(
!
encoder
->
size
,
"Got incorrect size = %u.
\n
"
,
encoder
->
size
);
ok
(
!
encoder
->
len
,
"Got incorrect length = %u.
\n
"
,
encoder
->
len
);
ok
(
encoder
->
err
==
ASN1_SUCCESS
,
"Got incorrect err = %d.
\n
"
,
encoder
->
err
);
ok
(
!
encoder
->
bit
,
"Got incorrect bit = %u.
\n
"
,
encoder
->
bit
);
ok
(
!
encoder
->
pos
,
"Got incorrect pos = %p.
\n
"
,
encoder
->
pos
);
ok
(
!
encoder
->
cbExtraHeader
,
"Got incorrect cbExtraHeader = %u.
\n
"
,
encoder
->
cbExtraHeader
);
ok
(
encoder
->
eRule
==
ASN1_BER_RULE_DER
,
"Got incorrect eRule = %08x.
\n
"
,
encoder
->
eRule
);
ok
(
encoder
->
dwFlags
==
ASN1ENCODE_NOASSERT
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
0
,
NULL
);
ok
(
ASN1_SUCCEEDED
(
ret
),
"Got error code %d.
\n
"
,
ret
);
ok
(
!!
encoder
,
"Encoder creation failed.
\n
"
);
ok
(
encoder
->
magic
==
0x44434e45
,
"Got invalid magic = %08x.
\n
"
,
encoder
->
magic
);
ok
(
!
encoder
->
version
,
"Got incorrect version = %08x.
\n
"
,
encoder
->
version
);
ok
(
encoder
->
module
==
mod
,
"Got incorrect module = %p.
\n
"
,
encoder
->
module
);
ok
(
!
encoder
->
buf
,
"Got incorrect buf = %p.
\n
"
,
encoder
->
buf
);
ok
(
!
encoder
->
size
,
"Got incorrect size = %u.
\n
"
,
encoder
->
size
);
ok
(
!
encoder
->
len
,
"Got incorrect length = %u.
\n
"
,
encoder
->
len
);
ok
(
encoder
->
err
==
ASN1_SUCCESS
,
"Got incorrect err = %d.
\n
"
,
encoder
->
err
);
ok
(
!
encoder
->
bit
,
"Got incorrect bit = %u.
\n
"
,
encoder
->
bit
);
ok
(
!
encoder
->
pos
,
"Got incorrect pos = %p.
\n
"
,
encoder
->
pos
);
ok
(
!
encoder
->
cbExtraHeader
,
"Got incorrect cbExtraHeader = %u.
\n
"
,
encoder
->
cbExtraHeader
);
ok
(
encoder
->
eRule
==
ASN1_BER_RULE_DER
,
"Got incorrect eRule = %08x.
\n
"
,
encoder
->
eRule
);
ok
(
encoder
->
dwFlags
==
ASN1ENCODE_NOASSERT
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
2
,
NULL
);
ok
(
ASN1_SUCCEEDED
(
ret
),
"Got error code %d.
\n
"
,
ret
);
ok
(
!!
encoder
,
"Encoder creation failed.
\n
"
);
ok
(
encoder
->
magic
==
0x44434e45
,
"Got invalid magic = %08x.
\n
"
,
encoder
->
magic
);
ok
(
!
encoder
->
version
,
"Got incorrect version = %08x.
\n
"
,
encoder
->
version
);
ok
(
encoder
->
module
==
mod
,
"Got incorrect module = %p.
\n
"
,
encoder
->
module
);
ok
(
encoder
->
buf
==
buf
,
"Got incorrect buf = %p.
\n
"
,
encoder
->
buf
);
ok
(
encoder
->
size
==
2
,
"Got incorrect size = %u.
\n
"
,
encoder
->
size
);
ok
(
!
encoder
->
len
,
"Got incorrect length = %u.
\n
"
,
encoder
->
len
);
ok
(
encoder
->
err
==
ASN1_SUCCESS
,
"Got incorrect err = %d.
\n
"
,
encoder
->
err
);
ok
(
!
encoder
->
bit
,
"Got incorrect bit = %u.
\n
"
,
encoder
->
bit
);
ok
(
encoder
->
pos
==
buf
,
"Got incorrect pos = %p.
\n
"
,
encoder
->
pos
);
ok
(
!
encoder
->
cbExtraHeader
,
"Got incorrect cbExtraHeader = %u.
\n
"
,
encoder
->
cbExtraHeader
);
ok
(
encoder
->
eRule
==
ASN1_BER_RULE_DER
,
"Got incorrect eRule = %08x.
\n
"
,
encoder
->
eRule
);
ok
(
encoder
->
dwFlags
==
(
ASN1ENCODE_NOASSERT
|
ASN1ENCODE_SETBUFFER
),
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
4
,
NULL
);
ok
(
ASN1_SUCCEEDED
(
ret
),
"Got error code %d.
\n
"
,
ret
);
ok
(
!!
encoder
,
"Encoder creation failed.
\n
"
);
ok
(
encoder
->
magic
==
0x44434e45
,
"Got invalid magic = %08x.
\n
"
,
encoder
->
magic
);
ok
(
!
encoder
->
version
,
"Got incorrect version = %08x.
\n
"
,
encoder
->
version
);
ok
(
encoder
->
module
==
mod
,
"Got incorrect module = %p.
\n
"
,
encoder
->
module
);
ok
(
encoder
->
buf
==
buf
,
"Got incorrect buf = %p.
\n
"
,
encoder
->
buf
);
ok
(
encoder
->
size
==
4
,
"Got incorrect size = %u.
\n
"
,
encoder
->
size
);
ok
(
!
encoder
->
len
,
"Got incorrect length = %u.
\n
"
,
encoder
->
len
);
ok
(
encoder
->
err
==
ASN1_SUCCESS
,
"Got incorrect err = %d.
\n
"
,
encoder
->
err
);
ok
(
!
encoder
->
bit
,
"Got incorrect bit = %u.
\n
"
,
encoder
->
bit
);
ok
(
encoder
->
pos
==
buf
,
"Got incorrect pos = %p.
\n
"
,
encoder
->
pos
);
ok
(
!
encoder
->
cbExtraHeader
,
"Got incorrect cbExtraHeader = %u.
\n
"
,
encoder
->
cbExtraHeader
);
ok
(
encoder
->
eRule
==
ASN1_BER_RULE_DER
,
"Got incorrect rule = %08x.
\n
"
,
encoder
->
eRule
);
ok
(
encoder
->
dwFlags
==
(
ASN1ENCODE_NOASSERT
|
ASN1ENCODE_SETBUFFER
),
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ASN1_CloseModule
(
mod
);
mod
=
ASN1_CreateModule
(
ASN1_THIS_VERSION
,
ASN1_BER_RULE_DER
,
ASN1FLAGS_NONE
,
1
,
encfn
,
decfn
,
freefn
,
size
,
name
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
0
,
NULL
);
ok
(
encoder
->
dwFlags
==
0
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
4
,
NULL
);
ok
(
encoder
->
dwFlags
==
ASN1ENCODE_SETBUFFER
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ASN1_CloseModule
(
mod
);
mod
=
ASN1_CreateModule
(
ASN1_THIS_VERSION
,
ASN1_PER_RULE_ALIGNED
,
ASN1FLAGS_NOASSERT
,
1
,
encfn
,
decfn
,
freefn
,
size
,
name
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
0
,
NULL
);
ok
(
ASN1_SUCCEEDED
(
ret
),
"Got error code %d.
\n
"
,
ret
);
ok
(
!!
encoder
,
"Encoder creation failed.
\n
"
);
ok
(
encoder
->
magic
==
0x44434e45
,
"Got invalid magic = %08x.
\n
"
,
encoder
->
magic
);
ok
(
!
encoder
->
version
,
"Got incorrect version = %08x.
\n
"
,
encoder
->
version
);
ok
(
encoder
->
module
==
mod
,
"Got incorrect module = %p.
\n
"
,
encoder
->
module
);
ok
(
!
encoder
->
buf
,
"Got incorrect buf = %p.
\n
"
,
encoder
->
buf
);
ok
(
!
encoder
->
size
,
"Got incorrect size = %u.
\n
"
,
encoder
->
size
);
ok
(
!
encoder
->
len
,
"Got incorrect length = %u.
\n
"
,
encoder
->
len
);
ok
(
encoder
->
err
==
ASN1_SUCCESS
,
"Got incorrect err = %d.
\n
"
,
encoder
->
err
);
ok
(
!
encoder
->
bit
,
"Got incorrect bit = %u.
\n
"
,
encoder
->
bit
);
ok
(
!
encoder
->
pos
,
"Got incorrect pos = %p.
\n
"
,
encoder
->
pos
);
ok
(
!
encoder
->
cbExtraHeader
,
"Got incorrect cbExtraHeader = %u.
\n
"
,
encoder
->
cbExtraHeader
);
ok
(
encoder
->
eRule
==
ASN1_PER_RULE_ALIGNED
,
"Got incorrect eRule = %08x.
\n
"
,
encoder
->
eRule
);
ok
(
encoder
->
dwFlags
==
ASN1ENCODE_NOASSERT
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
4
,
NULL
);
ok
(
!!
encoder
,
"Encoder creation failed.
\n
"
);
ok
(
encoder
->
magic
==
0x44434e45
,
"Got invalid magic = %08x.
\n
"
,
encoder
->
magic
);
ok
(
!
encoder
->
version
,
"Got incorrect version = %08x.
\n
"
,
encoder
->
version
);
ok
(
encoder
->
module
==
mod
,
"Got incorrect module = %p.
\n
"
,
encoder
->
module
);
ok
(
encoder
->
buf
==
buf
,
"Got incorrect buf = %p.
\n
"
,
encoder
->
buf
);
ok
(
encoder
->
size
==
4
,
"Got incorrect size = %u.
\n
"
,
encoder
->
size
);
ok
(
!
encoder
->
len
,
"Got incorrect length = %u.
\n
"
,
encoder
->
len
);
ok
(
encoder
->
err
==
ASN1_SUCCESS
,
"Got incorrect err = %d.
\n
"
,
encoder
->
err
);
ok
(
!
encoder
->
bit
,
"Got incorrect bit = %u.
\n
"
,
encoder
->
bit
);
ok
(
encoder
->
pos
==
buf
,
"Got incorrect pos = %p.
\n
"
,
encoder
->
pos
);
ok
(
!
encoder
->
cbExtraHeader
,
"Got incorrect cbExtraHeader = %u.
\n
"
,
encoder
->
cbExtraHeader
);
ok
(
encoder
->
eRule
==
ASN1_PER_RULE_ALIGNED
,
"Got incorrect rule = %08x.
\n
"
,
encoder
->
eRule
);
ok
(
encoder
->
dwFlags
==
(
ASN1FLAGS_NOASSERT
|
ASN1ENCODE_SETBUFFER
),
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ASN1_CloseModule
(
mod
);
mod
=
ASN1_CreateModule
(
ASN1_THIS_VERSION
,
ASN1_PER_RULE_ALIGNED
,
ASN1FLAGS_NONE
,
1
,
encfn
,
decfn
,
freefn
,
size
,
name
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
0
,
NULL
);
ok
(
encoder
->
dwFlags
==
0
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ret
=
ASN1_CreateEncoder
(
mod
,
&
encoder
,
buf
,
4
,
NULL
);
ok
(
encoder
->
dwFlags
==
ASN1ENCODE_SETBUFFER
,
"Got incorrect dwFlags = %08x.
\n
"
,
encoder
->
dwFlags
);
ASN1_CloseModule
(
mod
);
}
START_TEST
(
asn1
)
{
test_CreateModule
();
test_CreateEncoder
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment