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
b972a5d3
Commit
b972a5d3
authored
Feb 11, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Feb 12, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Support an alternate OID in order to fix a test on some Windows 98 systems.
parent
1137d630
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
47 deletions
+66
-47
oid.c
dlls/crypt32/tests/oid.c
+66
-47
No files found.
dlls/crypt32/tests/oid.c
View file @
b972a5d3
...
...
@@ -34,58 +34,59 @@ static BOOL (WINAPI *pCryptEnumOIDInfo)(DWORD,DWORD,void*,PFN_CRYPT_ENUM_OID_INF
struct
OIDToAlgID
{
LPCSTR
oid
;
LPCSTR
altOid
;
DWORD
algID
;
};
static
const
struct
OIDToAlgID
oidToAlgID
[]
=
{
{
szOID_RSA_RSA
,
CALG_RSA_KEYX
},
{
szOID_RSA_MD2RSA
,
CALG_MD2
},
{
szOID_RSA_MD4RSA
,
CALG_MD4
},
{
szOID_RSA_MD5RSA
,
CALG_MD5
},
{
szOID_RSA_SHA1RSA
,
CALG_SHA
},
{
szOID_RSA_DH
,
CALG_DH_SF
},
{
szOID_RSA_SMIMEalgESDH
,
CALG_DH_EPHEM
},
{
szOID_RSA_SMIMEalgCMS3DESwrap
,
CALG_3DES
},
{
szOID_RSA_SMIMEalgCMSRC2wrap
,
CALG_RC2
},
{
szOID_RSA_MD2
,
CALG_MD2
},
{
szOID_RSA_MD4
,
CALG_MD4
},
{
szOID_RSA_MD5
,
CALG_MD5
},
{
szOID_RSA_RC2CBC
,
CALG_RC2
},
{
szOID_RSA_RC4
,
CALG_RC4
},
{
szOID_RSA_DES_EDE3_CBC
,
CALG_3DES
},
{
szOID_ANSI_X942_DH
,
CALG_DH_SF
},
{
szOID_X957_DSA
,
CALG_DSS_SIGN
},
{
szOID_X957_SHA1DSA
,
CALG_SHA
},
{
szOID_OIWSEC_md4RSA
,
CALG_MD4
},
{
szOID_OIWSEC_md5RSA
,
CALG_MD5
},
{
szOID_OIWSEC_md4RSA2
,
CALG_MD4
},
{
szOID_OIWSEC_desCBC
,
CALG_DES
},
{
szOID_OIWSEC_dsa
,
CALG_DSS_SIGN
},
{
szOID_OIWSEC_shaDSA
,
CALG_SHA
},
{
szOID_OIWSEC_shaRSA
,
CALG_SHA
},
{
szOID_OIWSEC_sha
,
CALG_SHA
},
{
szOID_OIWSEC_rsaXchg
,
CALG_RSA_KEYX
},
{
szOID_OIWSEC_sha1
,
CALG_SHA
},
{
szOID_OIWSEC_dsaSHA1
,
CALG_SHA
},
{
szOID_OIWSEC_sha1RSASign
,
CALG_SHA
},
{
szOID_OIWDIR_md2RSA
,
CALG_MD2
},
{
szOID_INFOSEC_mosaicUpdatedSig
,
CALG_SHA
},
{
szOID_INFOSEC_mosaicKMandUpdSig
,
CALG_DSS_SIGN
},
{
szOID_RSA_RSA
,
NULL
,
CALG_RSA_KEYX
},
{
szOID_RSA_MD2RSA
,
NULL
,
CALG_MD2
},
{
szOID_RSA_MD4RSA
,
NULL
,
CALG_MD4
},
{
szOID_RSA_MD5RSA
,
NULL
,
CALG_MD5
},
{
szOID_RSA_SHA1RSA
,
NULL
,
CALG_SHA
},
{
szOID_RSA_DH
,
NULL
,
CALG_DH_SF
},
{
szOID_RSA_SMIMEalgESDH
,
NULL
,
CALG_DH_EPHEM
},
{
szOID_RSA_SMIMEalgCMS3DESwrap
,
NULL
,
CALG_3DES
},
{
szOID_RSA_SMIMEalgCMSRC2wrap
,
NULL
,
CALG_RC2
},
{
szOID_RSA_MD2
,
NULL
,
CALG_MD2
},
{
szOID_RSA_MD4
,
NULL
,
CALG_MD4
},
{
szOID_RSA_MD5
,
NULL
,
CALG_MD5
},
{
szOID_RSA_RC2CBC
,
NULL
,
CALG_RC2
},
{
szOID_RSA_RC4
,
NULL
,
CALG_RC4
},
{
szOID_RSA_DES_EDE3_CBC
,
NULL
,
CALG_3DES
},
{
szOID_ANSI_X942_DH
,
NULL
,
CALG_DH_SF
},
{
szOID_X957_DSA
,
NULL
,
CALG_DSS_SIGN
},
{
szOID_X957_SHA1DSA
,
NULL
,
CALG_SHA
},
{
szOID_OIWSEC_md4RSA
,
NULL
,
CALG_MD4
},
{
szOID_OIWSEC_md5RSA
,
NULL
,
CALG_MD5
},
{
szOID_OIWSEC_md4RSA2
,
NULL
,
CALG_MD4
},
{
szOID_OIWSEC_desCBC
,
NULL
,
CALG_DES
},
{
szOID_OIWSEC_dsa
,
NULL
,
CALG_DSS_SIGN
},
{
szOID_OIWSEC_shaDSA
,
NULL
,
CALG_SHA
},
{
szOID_OIWSEC_shaRSA
,
NULL
,
CALG_SHA
},
{
szOID_OIWSEC_sha
,
NULL
,
CALG_SHA
},
{
szOID_OIWSEC_rsaXchg
,
NULL
,
CALG_RSA_KEYX
},
{
szOID_OIWSEC_sha1
,
NULL
,
CALG_SHA
},
{
szOID_OIWSEC_dsaSHA1
,
NULL
,
CALG_SHA
},
{
szOID_OIWSEC_sha1RSASign
,
NULL
,
CALG_SHA
},
{
szOID_OIWDIR_md2RSA
,
NULL
,
CALG_MD2
},
{
szOID_INFOSEC_mosaicUpdatedSig
,
NULL
,
CALG_SHA
},
{
szOID_INFOSEC_mosaicKMandUpdSig
,
NULL
,
CALG_DSS_SIGN
},
};
static
const
struct
OIDToAlgID
algIDToOID
[]
=
{
{
szOID_RSA_RSA
,
CALG_RSA_KEYX
},
{
szOID_RSA_SMIMEalgESDH
,
CALG_DH_EPHEM
},
{
szOID_RSA_MD2
,
CALG_MD2
},
{
szOID_RSA_MD4
,
CALG_MD4
},
{
szOID_RSA_MD5
,
CALG_MD5
},
{
szOID_RSA_RC2CBC
,
CALG_RC2
},
{
szOID_RSA_RC4
,
CALG_RC4
},
{
szOID_RSA_DES_EDE3_CBC
,
CALG_3DES
},
{
szOID_ANSI_X942_DH
,
CALG_DH_SF
},
{
szOID_X957_DSA
,
CALG_DSS_SIGN
},
{
szOID_OIWSEC_desCBC
,
CALG_DES
},
{
szOID_OIWSEC_sha1
,
CALG_SHA
},
{
szOID_RSA_RSA
,
NULL
,
CALG_RSA_KEYX
},
{
szOID_RSA_SMIMEalgESDH
,
NULL
,
CALG_DH_EPHEM
},
{
szOID_RSA_MD2
,
NULL
,
CALG_MD2
},
{
szOID_RSA_MD4
,
NULL
,
CALG_MD4
},
{
szOID_RSA_MD5
,
NULL
,
CALG_MD5
},
{
szOID_RSA_RC2CBC
,
NULL
,
CALG_RC2
},
{
szOID_RSA_RC4
,
NULL
,
CALG_RC4
},
{
szOID_RSA_DES_EDE3_CBC
,
NULL
,
CALG_3DES
},
{
szOID_ANSI_X942_DH
,
NULL
,
CALG_DH_SF
},
{
szOID_X957_DSA
,
szOID_OIWSEC_dsa
/* some Win98 */
,
CALG_DSS_SIGN
},
{
szOID_OIWSEC_desCBC
,
NULL
,
CALG_DES
},
{
szOID_OIWSEC_sha1
,
NULL
,
CALG_SHA
},
};
static
const
WCHAR
bogusDll
[]
=
{
'b'
,
'o'
,
'g'
,
'u'
,
's'
,
'.'
,
'd'
,
'l'
,
'l'
,
0
};
...
...
@@ -134,8 +135,26 @@ static void testAlgIDToOID(void)
oid
=
CertAlgIdToOID
(
algIDToOID
[
i
].
algID
);
/* Allow failure, not every version of Windows supports every algo */
if
(
oid
)
ok
(
!
strcmp
(
oid
,
algIDToOID
[
i
].
oid
),
"Expected %s, got %s
\n
"
,
algIDToOID
[
i
].
oid
,
oid
);
{
if
(
strcmp
(
oid
,
algIDToOID
[
i
].
oid
))
{
if
(
algIDToOID
[
i
].
altOid
)
ok
(
!
strcmp
(
oid
,
algIDToOID
[
i
].
oid
)
||
!
strcmp
(
oid
,
algIDToOID
[
i
].
altOid
),
"Expected %s or %s, got %s
\n
"
,
algIDToOID
[
i
].
oid
,
algIDToOID
[
i
].
altOid
,
oid
);
else
{
/* No need to rerun the test, we already know it failed. */
ok
(
0
,
"Expected %s, got %s
\n
"
,
algIDToOID
[
i
].
oid
,
oid
);
}
}
else
{
/* No need to rerun the test, we already know it succeeded. */
ok
(
1
,
"Expected %s, got %s
\n
"
,
algIDToOID
[
i
].
oid
,
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