summaryrefslogtreecommitdiffstats
path: root/src/network/ssl/qsslkey_openssl.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-03-05 22:25:45 -0800
committerThiago Macieira <thiago.macieira@intel.com>2015-03-12 02:46:59 +0000
commit08e45154fb508162cb4bab104f6a7c9d00c2e50d (patch)
tree2ab5b9017f69d19d2161fa53bf5ec1135d99c851 /src/network/ssl/qsslkey_openssl.cpp
parentc286afee3a817ffcfe0aba5fbe7c36cd791beda9 (diff)
QtNetwork: Fix const correctness in old style casts
Found with GCC's -Wcast-qual. Change-Id: Ia0aac2f09e9245339951ffff13c946859c282001 Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/ssl/qsslkey_openssl.cpp')
-rw-r--r--src/network/ssl/qsslkey_openssl.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp
index 8741ab524f..33cb81ce71 100644
--- a/src/network/ssl/qsslkey_openssl.cpp
+++ b/src/network/ssl/qsslkey_openssl.cpp
@@ -139,7 +139,7 @@ void QSslKeyPrivate::decodePem(const QByteArray &pem, const QByteArray &passPhra
if (!bio)
return;
- void *phrase = (void *)passPhrase.constData();
+ void *phrase = const_cast<char *>(passPhrase.constData());
if (algorithm == QSsl::Rsa) {
RSA *result = (type == QSsl::PublicKey)
@@ -201,7 +201,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
bio, rsa,
// ### the cipher should be selectable in the API:
passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),
- (uchar *)passPhrase.data(), passPhrase.size(), 0, 0)) {
+ const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)) {
fail = true;
}
}
@@ -214,7 +214,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
bio, dsa,
// ### the cipher should be selectable in the API:
passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),
- (uchar *)passPhrase.data(), passPhrase.size(), 0, 0)) {
+ const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)) {
fail = true;
}
}
@@ -228,7 +228,7 @@ QByteArray QSslKeyPrivate::toPem(const QByteArray &passPhrase) const
bio, ec,
// ### the cipher should be selectable in the API:
passPhrase.isEmpty() ? (const EVP_CIPHER *)0 : q_EVP_des_ede3_cbc(),
- (uchar *)passPhrase.data(), passPhrase.size(), 0, 0)) {
+ const_cast<uchar *>((const uchar *)passPhrase.data()), passPhrase.size(), 0, 0)) {
fail = true;
}
}