annotate ui/sslhelp.h @ 1381:c34f8c80cf7e

(Auto) Update translations
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 15 Jan 2015 15:28:52 +0100
parents c8a6a3e6bdeb
children
rev   line source
467
5ebee91c0bb8 Add missing include guard
Andre Heinecke <aheinecke@intevation.de>
parents: 464
diff changeset
1 #ifndef SSLHELP_H
5ebee91c0bb8 Add missing include guard
Andre Heinecke <aheinecke@intevation.de>
parents: 464
diff changeset
2 #define SSLHELP_H
452
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
3 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
4 * Software engineering by Intevation GmbH
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
5 *
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
6 * This file is Free Software under the GNU GPL (v>=2)
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
7 * and comes with ABSOLUTELY NO WARRANTY!
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
8 * See LICENSE.txt for details.
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
9 */
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
10
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
11
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
12 /**
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
13 * @file sslhelp.h
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
14 * @brief Helper functions to combine Qt with Polarssl
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
15 */
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
16 #include <polarssl/error.h>
464
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
17 #include <polarssl/pk.h>
452
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
18
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
19 #include <QString>
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
20
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
21 /** @brief get a human readable error message for a polarssl return code
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
22 *
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
23 * @param [in] ret A polarssl error code
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
24 * @returns A QString representation of that error
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
25 */
f8b480b08532 Factor out polarssl error handling and start new sslhelp file
Andre Heinecke <aheinecke@intevation.de>
parents:
diff changeset
26 QString getPolarSSLErrorMsg(int ret);
464
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
27
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
28 /** @brief calculate the sha256 of the bytearray data
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
29 *
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
30 * @param [in] data The data to hash
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
31 * @returns the sha256sum of the data
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
32 */
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
33 QByteArray sha256sum(const QByteArray& data);
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
34
1377
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
35 /** @brief calculate the sha1 of the bytearray data
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
36 *
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
37 * @param [in] data The data to hash
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
38 * @returns the sha1sum of the data
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
39 */
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
40 QByteArray sha1sum(const QByteArray& data);
c8a6a3e6bdeb (issue178) Show checksums after installer creation
Andre Heinecke <andre.heinecke@intevation.de>
parents: 467
diff changeset
41
464
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
42 /** @brief Create a RSA signature fur a sha256 hashsum
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
43 *
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
44 * @param [in] hash the hash to sign.
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
45 * @param [in] pk the key to use.
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
46 * @returns the signature of the data or an empty byte array on error
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
47 */
2e100d3e414a Add helper functions for sha256 sum and rsa signing
Andre Heinecke <aheinecke@intevation.de>
parents: 452
diff changeset
48 QByteArray rsaSignSHA256Hash(const QByteArray& hash, pk_context *pk);
467
5ebee91c0bb8 Add missing include guard
Andre Heinecke <aheinecke@intevation.de>
parents: 464
diff changeset
49 #endif // SSLHELP_H

http://wald.intevation.org/projects/trustbridge/