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
cbfcfc23
Commit
cbfcfc23
authored
Jun 29, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Jun 30, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Add OID info for szOID_ECC_PUBLIC_KEY.
parent
073c2394
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
+2
-0
oid.c
dlls/crypt32/tests/oid.c
+14
-1
No files found.
dlls/crypt32/oid.c
View file @
cbfcfc23
...
@@ -1271,6 +1271,8 @@ static const struct OIDInfoConstructor {
...
@@ -1271,6 +1271,8 @@ static const struct OIDInfoConstructor {
{
3
,
szOID_INFOSEC_mosaicKMandUpdSig
,
CALG_DSS_SIGN
,
L"mosaicKMandUpdSig"
,
&
mosaicFlagsBlob
},
{
3
,
szOID_INFOSEC_mosaicKMandUpdSig
,
CALG_DSS_SIGN
,
L"mosaicKMandUpdSig"
,
&
mosaicFlagsBlob
},
{
3
,
szOID_RSA_SMIMEalgESDH
,
CALG_DH_EPHEM
,
L"ESDH"
,
&
noNullBlob
},
{
3
,
szOID_RSA_SMIMEalgESDH
,
CALG_DH_EPHEM
,
L"ESDH"
,
&
noNullBlob
},
{
3
,
szOID_PKIX_NO_SIGNATURE
,
CALG_NO_SIGN
,
L"NOSIGN"
,
NULL
},
{
3
,
szOID_PKIX_NO_SIGNATURE
,
CALG_NO_SIGN
,
L"NOSIGN"
,
NULL
},
{
3
,
szOID_ECC_PUBLIC_KEY
,
CALG_OID_INFO_PARAMETERS
,
L"ECC"
,
NULL
,
CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM
,
L""
},
{
4
,
szOID_RSA_SHA1RSA
,
CALG_SHA1
,
L"sha1RSA"
,
&
rsaSignBlob
},
{
4
,
szOID_RSA_SHA1RSA
,
CALG_SHA1
,
L"sha1RSA"
,
&
rsaSignBlob
},
{
4
,
szOID_RSA_SHA256RSA
,
CALG_SHA_256
,
L"sha256RSA"
,
&
rsaSignBlob
},
{
4
,
szOID_RSA_SHA256RSA
,
CALG_SHA_256
,
L"sha256RSA"
,
&
rsaSignBlob
},
...
...
dlls/crypt32/tests/oid.c
View file @
cbfcfc23
...
@@ -72,7 +72,8 @@ static const struct OIDToAlgID oidToAlgID[] = {
...
@@ -72,7 +72,8 @@ static const struct OIDToAlgID oidToAlgID[] = {
{
szOID_INFOSEC_mosaicKMandUpdSig
,
CALG_DSS_SIGN
},
{
szOID_INFOSEC_mosaicKMandUpdSig
,
CALG_DSS_SIGN
},
{
szOID_NIST_sha256
,
CALG_SHA_256
,
-
1
},
{
szOID_NIST_sha256
,
CALG_SHA_256
,
-
1
},
{
szOID_NIST_sha384
,
CALG_SHA_384
,
-
1
},
{
szOID_NIST_sha384
,
CALG_SHA_384
,
-
1
},
{
szOID_NIST_sha512
,
CALG_SHA_512
,
-
1
}
{
szOID_NIST_sha512
,
CALG_SHA_512
,
-
1
},
{
szOID_ECC_PUBLIC_KEY
,
CALG_OID_INFO_PARAMETERS
},
};
};
static
const
struct
OIDToAlgID
algIDToOID
[]
=
{
static
const
struct
OIDToAlgID
algIDToOID
[]
=
{
...
@@ -509,6 +510,7 @@ static void test_findOIDInfo(void)
...
@@ -509,6 +510,7 @@ static void test_findOIDInfo(void)
{
{
static
CHAR
oid_rsa_md5
[]
=
szOID_RSA_MD5
,
oid_sha256
[]
=
szOID_NIST_sha256
;
static
CHAR
oid_rsa_md5
[]
=
szOID_RSA_MD5
,
oid_sha256
[]
=
szOID_NIST_sha256
;
static
CHAR
oid_ecdsa_sha256
[]
=
szOID_ECDSA_SHA256
;
static
CHAR
oid_ecdsa_sha256
[]
=
szOID_ECDSA_SHA256
;
static
CHAR
oid_ecc_public_key
[]
=
szOID_ECC_PUBLIC_KEY
;
ALG_ID
alg
=
CALG_SHA1
;
ALG_ID
alg
=
CALG_SHA1
;
ALG_ID
algs
[
2
]
=
{
CALG_MD5
,
CALG_RSA_SIGN
};
ALG_ID
algs
[
2
]
=
{
CALG_MD5
,
CALG_RSA_SIGN
};
const
struct
oid_info
const
struct
oid_info
...
@@ -573,6 +575,17 @@ static void test_findOIDInfo(void)
...
@@ -573,6 +575,17 @@ static void test_findOIDInfo(void)
}
}
else
else
win_skip
(
"Host does not support ECDSA_SHA256, skipping test
\n
"
);
win_skip
(
"Host does not support ECDSA_SHA256, skipping test
\n
"
);
info
=
CryptFindOIDInfo
(
CRYPT_OID_INFO_OID_KEY
,
oid_ecc_public_key
,
0
);
ok
(
!!
info
,
"got error %#lx.
\n
"
,
GetLastError
());
ok
(
!
strcmp
(
info
->
pszOID
,
oid_ecc_public_key
),
"got %s.
\n
"
,
info
->
pszOID
);
ok
(
!
wcscmp
(
info
->
pwszName
,
L"ECC"
),
"got %s.
\n
"
,
wine_dbgstr_w
(
info
->
pwszName
));
ok
(
info
->
dwGroupId
==
CRYPT_PUBKEY_ALG_OID_GROUP_ID
,
"got %lu.
\n
"
,
info
->
dwGroupId
);
ok
(
U
(
*
info
).
Algid
==
CALG_OID_INFO_PARAMETERS
,
"got %d.
\n
"
,
U
(
*
info
).
Algid
);
ok
(
!
info
->
ExtraInfo
.
cbData
,
"got %ld.
\n
"
,
info
->
ExtraInfo
.
cbData
);
ok
(
!
wcscmp
(
info
->
pwszCNGAlgid
,
CRYPT_OID_INFO_ECC_PARAMETERS_ALGORITHM
),
"got %s.
\n
"
,
wine_dbgstr_w
(
info
->
pwszCNGAlgid
));
ok
(
info
->
pwszCNGExtraAlgid
&&
!
wcscmp
(
info
->
pwszCNGExtraAlgid
,
L""
),
"got %s.
\n
"
,
wine_dbgstr_w
(
info
->
pwszCNGExtraAlgid
));
}
}
static
void
test_registerOIDInfo
(
void
)
static
void
test_registerOIDInfo
(
void
)
...
...
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