aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFCrypto_gnutls.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-02-08 15:18:08 +0100
committerJay Berkenbilt <ejb@ql.org>2022-02-08 17:51:15 +0100
commitcb769c62e55599e9f980001830bc61d9fcaa64a9 (patch)
tree0bf980c385a61cbc8720cf990762ffc1200f9d6a /libqpdf/QPDFCrypto_gnutls.cc
parent716381f65a2b2dc72f8da2426ba71aeab02c507f (diff)
downloadqpdf-cb769c62e55599e9f980001830bc61d9fcaa64a9.tar.zst
WHITESPACE ONLY -- expand tabs in source code
This comment expands all tabs using an 8-character tab-width. You should ignore this commit when using git blame or use git blame -w. In the early days, I used to use tabs where possible for indentation, since emacs did this automatically. In recent years, I have switched to only using spaces, which means qpdf source code has been a mixture of spaces and tabs. I have avoided cleaning this up because of not wanting gratuitous whitespaces change to cloud the output of git blame, but I changed my mind after discussing with users who view qpdf source code in editors/IDEs that have other tab widths by default and in light of the fact that I am planning to start applying automatic code formatting soon.
Diffstat (limited to 'libqpdf/QPDFCrypto_gnutls.cc')
-rw-r--r--libqpdf/QPDFCrypto_gnutls.cc30
1 files changed, 15 insertions, 15 deletions
diff --git a/libqpdf/QPDFCrypto_gnutls.cc b/libqpdf/QPDFCrypto_gnutls.cc
index f5fdba8a..8c05f314 100644
--- a/libqpdf/QPDFCrypto_gnutls.cc
+++ b/libqpdf/QPDFCrypto_gnutls.cc
@@ -20,11 +20,11 @@ QPDFCrypto_gnutls::~QPDFCrypto_gnutls()
{
if (this->hash_ctx)
{
- gnutls_hash_deinit(this->hash_ctx, digest);
+ gnutls_hash_deinit(this->hash_ctx, digest);
}
if (cipher_ctx)
{
- gnutls_cipher_deinit(this->cipher_ctx);
+ gnutls_cipher_deinit(this->cipher_ctx);
}
this->aes_key_data = nullptr;
this->aes_key_len = 0;
@@ -36,8 +36,8 @@ QPDFCrypto_gnutls::provideRandomData(unsigned char* data, size_t len)
int code = gnutls_rnd (GNUTLS_RND_KEY, data, len);
if (code < 0)
{
- throw std::runtime_error(
- std::string("gnutls: random number generation error: ") +
+ throw std::runtime_error(
+ std::string("gnutls: random number generation error: ") +
std::string(gnutls_strerror(code)));
}
}
@@ -50,8 +50,8 @@ QPDFCrypto_gnutls::MD5_init()
if (code < 0)
{
this->hash_ctx = nullptr;
- throw std::runtime_error(
- std::string("gnutls: MD5 error: ") +
+ throw std::runtime_error(
+ std::string("gnutls: MD5 error: ") +
std::string(gnutls_strerror(code)));
}
}
@@ -84,7 +84,7 @@ QPDFCrypto_gnutls::RC4_init(unsigned char const* key_data, int key_len)
RC4_finalize();
if (key_len == -1)
{
- key_len = QIntC::to_int(
+ key_len = QIntC::to_int(
strlen(reinterpret_cast<char const*>(key_data)));
}
gnutls_datum_t key;
@@ -96,8 +96,8 @@ QPDFCrypto_gnutls::RC4_init(unsigned char const* key_data, int key_len)
if (code < 0)
{
this->cipher_ctx = nullptr;
- throw std::runtime_error(
- std::string("gnutls: RC4 error: ") +
+ throw std::runtime_error(
+ std::string("gnutls: RC4 error: ") +
std::string(gnutls_strerror(code)));
}
}
@@ -118,8 +118,8 @@ QPDFCrypto_gnutls::RC4_finalize()
{
if (this->cipher_ctx)
{
- gnutls_cipher_deinit(this->cipher_ctx);
- this->cipher_ctx = nullptr;
+ gnutls_cipher_deinit(this->cipher_ctx);
+ this->cipher_ctx = nullptr;
}
}
@@ -148,8 +148,8 @@ QPDFCrypto_gnutls::SHA2_init(int bits)
if (code < 0)
{
this->hash_ctx = nullptr;
- throw std::runtime_error(
- std::string("gnutls: SHA") + QUtil::int_to_string(bits) +
+ throw std::runtime_error(
+ std::string("gnutls: SHA") + QUtil::int_to_string(bits) +
" error: " + std::string(gnutls_strerror(code)));
}
}
@@ -278,8 +278,8 @@ QPDFCrypto_gnutls::rijndael_finalize()
{
if (this->cipher_ctx)
{
- gnutls_cipher_deinit(this->cipher_ctx);
- this->cipher_ctx = nullptr;
+ gnutls_cipher_deinit(this->cipher_ctx);
+ this->cipher_ctx = nullptr;
}
}