NetSurf
ssl_cert.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 Vincent Sanders <vince@netsurf-browser.org>
3  *
4  * This file is part of NetSurf, http://www.netsurf-browser.org/
5  *
6  * NetSurf is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * NetSurf is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  */
18 
19 /**
20  * \file
21  * Interface to win32 certificate viewing using nsw32 core windows.
22  */
23 
24 #ifndef NETSURF_WINDOWS_SSL_CERT_H
25 #define NETSURF_WINDOWS_SSL_CERT_H 1
26 
27 struct nsurl;
28 struct cert_chain;
29 
30 /**
31  * Prompt the user to verify a certificate with issuse.
32  *
33  * \param url The URL being verified.
34  * \param certs The certificate to be verified
35  * \param num The number of certificates to be verified.
36  * \param cb Callback upon user decision.
37  * \param cbpw Context pointer passed to cb
38  * \return NSERROR_OK or error code if prompt creation failed.
39  */
40 nserror nsw32_cert_verify(struct nsurl *url, const struct cert_chain *certs, nserror (*cb)(bool proceed, void *pw), void *cbpw);
41 
42 /**
43  * Create the ssl viewer window class.
44  *
45  * \param hinstance The application instance
46  * \return NSERROR_OK on success or NSERROR_INIT_FAILED if the class
47  * creation failed.
48  */
49 nserror nsws_create_cert_verify_class(HINSTANCE hinstance);
50 
51 #endif
nserror
Enumeration of error codes.
Definition: errors.h:29
X509 certificate chain.
Definition: ssl_certs.h:59
nserror nsws_create_cert_verify_class(HINSTANCE hinstance)
Create the ssl viewer window class.
Definition: ssl_cert.c:444
nserror nsw32_cert_verify(struct nsurl *url, const struct cert_chain *certs, nserror(*cb)(bool proceed, void *pw), void *cbpw)
Prompt the user to verify a certificate with issuse.
Definition: ssl_cert.c:172
struct nsurl nsurl
NetSurf URL object.
Definition: nsurl.h:31
struct cert_chain::@62 certs[MAX_CERT_DEPTH]