Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
224e3f43
Commit
224e3f43
authored
Jun 22, 2018
by
Michael Müller
Committed by
Alexandre Julliard
Jun 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add oids for sha256ECDSA and sha384ECDSA.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3b168abc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
oid.c
dlls/crypt32/oid.c
+15
-0
oid.c
dlls/crypt32/tests/oid.c
+1
-1
No files found.
dlls/crypt32/oid.c
View file @
224e3f43
...
...
@@ -25,6 +25,7 @@
#define NONAMELESSUNION
#include "windef.h"
#include "winbase.h"
#define CRYPT_OID_INFO_HAS_EXTRA_FIELDS
#include "wincrypt.h"
#include "winreg.h"
#include "winuser.h"
...
...
@@ -1080,6 +1081,8 @@ static const WCHAR sha384RSA[] = { 's','h','a','3','8','4','R','S','A',0 };
static
const
WCHAR
sha512RSA
[]
=
{
's'
,
'h'
,
'a'
,
'5'
,
'1'
,
'2'
,
'R'
,
'S'
,
'A'
,
0
};
static
const
WCHAR
mosaicUpdatedSig
[]
=
{
'm'
,
'o'
,
's'
,
'a'
,
'i'
,
'c'
,
'U'
,
'p'
,
'd'
,
'a'
,
't'
,
'e'
,
'd'
,
'S'
,
'i'
,
'g'
,
0
};
static
const
WCHAR
sha256ECDSA
[]
=
{
's'
,
'h'
,
'a'
,
'2'
,
'5'
,
'6'
,
'E'
,
'C'
,
'D'
,
'S'
,
'A'
,
0
};
static
const
WCHAR
sha384ECDSA
[]
=
{
's'
,
'h'
,
'a'
,
'3'
,
'8'
,
'4'
,
'E'
,
'C'
,
'D'
,
'S'
,
'A'
,
0
};
static
const
WCHAR
CN
[]
=
{
'C'
,
'N'
,
0
};
static
const
WCHAR
L
[]
=
{
'L'
,
0
};
static
const
WCHAR
O
[]
=
{
'O'
,
0
};
...
...
@@ -1126,12 +1129,14 @@ static const DWORD dssSign[2] = { CALG_DSS_SIGN,
static
const
DWORD
mosaicSign
[
2
]
=
{
CALG_DSS_SIGN
,
CRYPT_OID_INHIBIT_SIGNATURE_FORMAT_FLAG
|
CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG
};
static
const
DWORD
ecdsaSign
[
2
]
=
{
CALG_OID_INFO_PARAMETERS
,
CRYPT_OID_NO_NULL_ALGORITHM_PARA_FLAG
};
static
const
CRYPT_DATA_BLOB
rsaSignBlob
=
{
sizeof
(
rsaSign
),
(
LPBYTE
)
&
rsaSign
};
static
const
CRYPT_DATA_BLOB
dssSignBlob
=
{
sizeof
(
dssSign
),
(
LPBYTE
)
dssSign
};
static
const
CRYPT_DATA_BLOB
mosaicSignBlob
=
{
sizeof
(
mosaicSign
),
(
LPBYTE
)
mosaicSign
};
static
const
CRYPT_DATA_BLOB
ecdsaSignBlob
=
{
sizeof
(
ecdsaSign
),
(
BYTE
*
)
ecdsaSign
};
static
const
DWORD
ia5String
[]
=
{
CERT_RDN_IA5_STRING
,
0
};
static
const
DWORD
numericString
[]
=
{
CERT_RDN_NUMERIC_STRING
,
0
};
...
...
@@ -1153,6 +1158,8 @@ static const struct OIDInfoConstructor {
UINT
Algid
;
LPCWSTR
pwszName
;
const
CRYPT_DATA_BLOB
*
blob
;
const
WCHAR
*
pwszCNGAlgid
;
const
WCHAR
*
pwszCNGExtraAlgid
;
}
oidInfoConstructors
[]
=
{
{
1
,
szOID_OIWSEC_sha1
,
CALG_SHA1
,
sha1
,
NULL
},
{
1
,
szOID_OIWSEC_sha1
,
CALG_SHA1
,
sha
,
NULL
},
...
...
@@ -1208,6 +1215,10 @@ static const struct OIDInfoConstructor {
{
4
,
szOID_OIWSEC_dsaSHA1
,
CALG_SHA1
,
dsaSHA1
,
&
dssSignBlob
},
{
4
,
szOID_INFOSEC_mosaicUpdatedSig
,
CALG_SHA1
,
mosaicUpdatedSig
,
&
mosaicSignBlob
},
{
4
,
szOID_ECDSA_SHA256
,
CALG_OID_INFO_CNG_ONLY
,
sha256ECDSA
,
&
ecdsaSignBlob
,
BCRYPT_SHA256_ALGORITHM
,
CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM
},
{
4
,
szOID_ECDSA_SHA384
,
CALG_OID_INFO_CNG_ONLY
,
sha384ECDSA
,
&
ecdsaSignBlob
,
BCRYPT_SHA384_ALGORITHM
,
CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM
},
{
5
,
szOID_COMMON_NAME
,
0
,
CN
,
NULL
},
{
5
,
szOID_LOCALITY_NAME
,
0
,
L
,
NULL
},
...
...
@@ -1422,6 +1433,8 @@ static void init_oid_info(void)
info
->
info
.
ExtraInfo
.
pbData
=
oidInfoConstructors
[
i
].
blob
->
pbData
;
}
info
->
info
.
pwszCNGAlgid
=
oidInfoConstructors
[
i
].
pwszCNGAlgid
;
info
->
info
.
pwszCNGExtraAlgid
=
oidInfoConstructors
[
i
].
pwszCNGExtraAlgid
;
list_add_tail
(
&
oidInfo
,
&
info
->
entry
);
}
}
...
...
@@ -1454,6 +1467,8 @@ static void init_oid_info(void)
info
->
info
.
ExtraInfo
.
pbData
=
oidInfoConstructors
[
i
].
blob
->
pbData
;
}
info
->
info
.
pwszCNGAlgid
=
oidInfoConstructors
[
i
].
pwszCNGAlgid
;
info
->
info
.
pwszCNGExtraAlgid
=
oidInfoConstructors
[
i
].
pwszCNGExtraAlgid
;
list_add_tail
(
&
oidInfo
,
&
info
->
entry
);
}
}
...
...
dlls/crypt32/tests/oid.c
View file @
224e3f43
...
...
@@ -611,7 +611,7 @@ static void test_findOIDInfo(void)
wine_dbgstr_w
(
CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM
),
wine_dbgstr_w
(
info
->
pwszCNGExtraAlgid
));
}
else
todo_wine
win_skip
(
"Host does not support ECDSA_SHA256, skipping test
\n
"
);
win_skip
(
"Host does not support ECDSA_SHA256, skipping test
\n
"
);
}
START_TEST
(
oid
)
...
...
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