Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/sslui.h
Show All 17 Lines | |||||
18 | * Boston, MA 02110-1301, USA. | 18 | * Boston, MA 02110-1301, USA. | ||
19 | */ | 19 | */ | ||
20 | 20 | | |||
21 | #ifndef _KSSLUI_H | 21 | #ifndef _KSSLUI_H | ||
22 | #define _KSSLUI_H | 22 | #define _KSSLUI_H | ||
23 | 23 | | |||
24 | #include "kiowidgets_export.h" | 24 | #include "kiowidgets_export.h" | ||
25 | #include <ksslerroruidata.h> | 25 | #include <ksslerroruidata.h> | ||
26 | #include <ktcpsocket.h> // TODO KF6 remove this include | 26 | #if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 64) | ||
27 | #include <ktcpsocket.h> | ||||
28 | #endif | ||||
27 | 29 | | |||
28 | namespace KIO | 30 | namespace KIO | ||
29 | { | 31 | { | ||
30 | /** UI methods for handling SSL errors. */ | 32 | /** UI methods for handling SSL errors. */ | ||
31 | namespace SslUi | 33 | namespace SslUi | ||
32 | { | 34 | { | ||
33 | 35 | | |||
34 | /** Error rule storage behavior. */ | 36 | /** Error rule storage behavior. */ | ||
35 | enum RulesStorage { | 37 | enum RulesStorage { | ||
36 | RecallRules = 1, ///< apply stored certificate rules (typically ignored errors) | 38 | RecallRules = 1, ///< apply stored certificate rules (typically ignored errors) | ||
37 | StoreRules = 2, ///< make new ignore rules from the user's choice and store them | 39 | StoreRules = 2, ///< make new ignore rules from the user's choice and store them | ||
38 | RecallAndStoreRules = 3 ///< apply stored rules and store new rules | 40 | RecallAndStoreRules = 3 ///< apply stored rules and store new rules | ||
39 | }; | 41 | }; | ||
40 | 42 | | |||
43 | #if KIOWIDGETS_ENABLE_DEPRECATED_SINCE(5, 64) | ||||
41 | /** | 44 | /** | ||
42 | * @deprecated since 5.64 use the KSslErrorUiData variant instead. | 45 | * @deprecated since 5.64 use the KSslErrorUiData variant instead. | ||
43 | */ | 46 | */ | ||
44 | bool KIOWIDGETS_DEPRECATED_EXPORT askIgnoreSslErrors(const KTcpSocket *socket, | 47 | KIOWIDGETS_DEPRECATED_VERSION(5, 64, "Use KIO::SslUi::askIgnoreSslErrors(const KSslErrorUiData &, RulesStorage)") | ||
45 | RulesStorage storedRules = RecallAndStoreRules); // TODO KF6 remove | 48 | bool KIOWIDGETS_EXPORT askIgnoreSslErrors(const KTcpSocket *socket, | ||
49 | RulesStorage storedRules = RecallAndStoreRules); | ||||
50 | #endif | ||||
46 | 51 | | |||
47 | /** | 52 | /** | ||
48 | * If there are errors while establishing an SSL encrypted connection to a peer, usually due to | 53 | * If there are errors while establishing an SSL encrypted connection to a peer, usually due to | ||
49 | * certificate issues, and since this poses a security issue, we need confirmation from the user about | 54 | * certificate issues, and since this poses a security issue, we need confirmation from the user about | ||
50 | * how they wish to proceed. | 55 | * how they wish to proceed. | ||
51 | * | 56 | * | ||
52 | * This function provides a dialog asking the user if they wish to abort the connection or ignore | 57 | * This function provides a dialog asking the user if they wish to abort the connection or ignore | ||
53 | * the SSL errors that occurred and continue connecting. And in case of the latter whether to remember | 58 | * the SSL errors that occurred and continue connecting. And in case of the latter whether to remember | ||
Show All 12 Lines |