KHtml

ksslkeygen.h
1 /* This file is part of the KDE project
2  *
3  * Copyright (C) 2001 George Staikos <[email protected]>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library 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 GNU
13  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB. If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  */
20 
21 #ifndef _KSSLKEYGEN_H
22 #define _KSSLKEYGEN_H
23 
24 #include <khtml_export.h>
25 
26 #include <QStringList>
27 #include <QWizard>
28 
29 class KSSLKeyGenPrivate;
30 
31 /**
32  * KDE Key Generation dialog
33  *
34  * This is used to display a key generation dialog for cases such as the
35  * html <keygen> tag. It also does the certificate signing request generation.
36  *
37  * @author George Staikos <[email protected]>
38  * @see KSSL, KSSLCertificate, KSSLPKCS12
39  * @short KDE Key Generation Dialog
40  */
41 class KHTML_EXPORT KSSLKeyGen : public QWizard
42 {
43  Q_OBJECT
44 public:
45  /**
46  * Construct a keygen dialog.
47  * @param parent the parent widget
48  */
49  explicit KSSLKeyGen(QWidget *parent = nullptr);
50 
51  /**
52  * Destroy this dialog.
53  */
54  virtual ~KSSLKeyGen();
55 
56  /**
57  * List the supported key sizes.
58  * @return the supported key sizes
59  */
60  static QStringList supportedKeySizes();
61 
62  /**
63  * Generate the certificate signing request.
64  * @param name the name for the certificate
65  * @param pass the password for the request
66  * @param bits the bitsize for the key
67  * @param e the value of the "e" parameter in RSA
68  * @return 0 on success, non-zero on error
69  */
70  int generateCSR(const QString &name, const QString &pass, int bits, int e = 0x10001);
71 
72  /**
73  * Set the key size.
74  * @param idx an index into supportedKeySizes()
75  */
76  void setKeySize(int idx);
77 
78 private:
79  bool validateCurrentPage() override;
80 
81 private:
82  KSSLKeyGenPrivate *const d;
83 };
84 
85 #endif
86 
virtual bool validateCurrentPage()
KDE Key Generation dialog.
Definition: ksslkeygen.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat Oct 16 2021 22:47:58 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.