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
7a40fdbf
Commit
7a40fdbf
authored
Jul 22, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jul 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: CertGetIssuerCertificateFromStore must return error for self-signed certificates.
parent
69d198a9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
cert.c
dlls/crypt32/cert.c
+6
-0
chain.c
dlls/crypt32/chain.c
+1
-1
crypt32_private.h
dlls/crypt32/crypt32_private.h
+1
-0
cert.c
dlls/crypt32/tests/cert.c
+0
-4
No files found.
dlls/crypt32/cert.c
View file @
7a40fdbf
...
...
@@ -1883,6 +1883,12 @@ PCCERT_CONTEXT WINAPI CertGetIssuerCertificateFromStore(HCERTSTORE hCertStore,
CertFreeCertificateContext
(
ret
);
ret
=
NULL
;
}
if
(
CRYPT_IsCertificateSelfSigned
(
pSubjectContext
))
{
CertFreeCertificateContext
(
ret
);
ret
=
NULL
;
SetLastError
(
CRYPT_E_SELF_SIGNED
);
}
}
TRACE
(
"returning %p
\n
"
,
ret
);
return
ret
;
...
...
dlls/crypt32/chain.c
View file @
7a40fdbf
...
...
@@ -265,7 +265,7 @@ typedef struct _CertificateChain
LONG
ref
;
}
CertificateChain
;
static
BOOL
CRYPT_IsCertificateSelfSigned
(
PCCERT_CONTEXT
cert
)
BOOL
CRYPT_IsCertificateSelfSigned
(
PCCERT_CONTEXT
cert
)
{
PCERT_EXTENSION
ext
;
DWORD
size
;
...
...
dlls/crypt32/crypt32_private.h
View file @
7a40fdbf
...
...
@@ -337,6 +337,7 @@ WINECRYPT_CERTSTORE *CRYPT_FileNameOpenStoreA(HCRYPTPROV hCryptProv,
WINECRYPT_CERTSTORE
*
CRYPT_FileNameOpenStoreW
(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
,
const
void
*
pvPara
)
DECLSPEC_HIDDEN
;
WINECRYPT_CERTSTORE
*
CRYPT_RootOpenStore
(
HCRYPTPROV
hCryptProv
,
DWORD
dwFlags
)
DECLSPEC_HIDDEN
;
BOOL
CRYPT_IsCertificateSelfSigned
(
PCCERT_CONTEXT
cert
)
DECLSPEC_HIDDEN
;
/* Allocates and initializes a certificate chain engine, but without creating
* the root store. Instead, it uses root, and assumes the caller has done any
...
...
dlls/crypt32/tests/cert.c
View file @
7a40fdbf
...
...
@@ -1728,9 +1728,7 @@ static void testGetIssuerCert(void)
SetLastError
(
0xdeadbeef
);
flags
=
0
;
parent
=
CertGetIssuerCertificateFromStore
(
store
,
cert3
,
NULL
,
&
flags
);
todo_wine
ok
(
!
parent
,
"Expected NULL
\n
"
);
todo_wine
ok
(
GetLastError
()
==
CRYPT_E_SELF_SIGNED
,
"Expected CRYPT_E_SELF_SIGNED, got %08X
\n
"
,
GetLastError
());
CertFreeCertificateContext
(
child
);
...
...
@@ -1747,9 +1745,7 @@ todo_wine
ok
(
cert1
!=
NULL
,
"CertEnumCertificatesInStore should have worked
\n
"
);
SetLastError
(
0xdeadbeef
);
parent
=
CertGetIssuerCertificateFromStore
(
store
,
cert1
,
NULL
,
&
flags
);
todo_wine
ok
(
!
parent
,
"Expected NULL
\n
"
);
todo_wine
ok
(
GetLastError
()
==
CRYPT_E_SELF_SIGNED
,
"Expected CRYPT_E_SELF_SIGNED, got %08X
\n
"
,
GetLastError
());
CertCloseStore
(
store
,
0
);
...
...
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