KIO

sslui.h
1/*
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2009 Andreas Hartmetz <ahartmetz@gmail.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef _KSSLUI_H
9#define _KSSLUI_H
10
11#include "kiowidgets_export.h"
12#include <ksslerroruidata.h>
13
14namespace KIO
15{
16/** UI methods for handling SSL errors. */
17namespace SslUi
18{
19/** Error rule storage behavior. */
21 RecallRules = 1, ///< apply stored certificate rules (typically ignored errors)
22 StoreRules = 2, ///< make new ignore rules from the user's choice and store them
23 RecallAndStoreRules = 3, ///< apply stored rules and store new rules
24};
25
26/**
27 * If there are errors while establishing an SSL encrypted connection to a peer, usually due to
28 * certificate issues, and since this poses a security issue, we need confirmation from the user about
29 * how they wish to proceed.
30 *
31 * This function provides a dialog asking the user if they wish to abort the connection or ignore
32 * the SSL errors that occurred and continue connecting. And in case of the latter whether to remember
33 * the decision in the future or ignore the error temporarily.
34 *
35 * @p uiData the KSslErrorUiData object constructed from the socket that is trying to establish the
36 * encrypted connection
37 * @p storedRules see RulesStorage Enum
38 */
39bool KIOWIDGETS_EXPORT askIgnoreSslErrors(const KSslErrorUiData &uiData, RulesStorage storedRules = RecallAndStoreRules);
40}
41}
42
43#endif
This class can hold all the necessary data from a QSslSocket or QNetworkReply to ask the user to cont...
RulesStorage
Error rule storage behavior.
Definition sslui.h:20
@ RecallRules
apply stored certificate rules (typically ignored errors)
Definition sslui.h:21
@ StoreRules
make new ignore rules from the user's choice and store them
Definition sslui.h:22
@ RecallAndStoreRules
apply stored rules and store new rules
Definition sslui.h:23
bool KIOWIDGETS_EXPORT askIgnoreSslErrors(const KSslErrorUiData &uiData, RulesStorage storedRules=RecallAndStoreRules)
If there are errors while establishing an SSL encrypted connection to a peer, usually due to certific...
Definition sslui.cpp:16
A namespace for KIO globals.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:58:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.