aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2013-11-22 14:31:52 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2013-11-22 14:31:52 -0800
commit3edffe25ab91702842a7553b028d50086c58eef1 (patch)
treeb26e9cdfc2026dae5a14a10da0055e6628f23a27
parentd203710bba3f2eb15a2e2db38a20305540af2eea (diff)
downloadcryptography-3edffe25ab91702842a7553b028d50086c58eef1.tar.gz
cryptography-3edffe25ab91702842a7553b028d50086c58eef1.tar.bz2
cryptography-3edffe25ab91702842a7553b028d50086c58eef1.zip
include the error message
-rw-r--r--cryptography/hazmat/bindings/openssl/backend.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/cryptography/hazmat/bindings/openssl/backend.py b/cryptography/hazmat/bindings/openssl/backend.py
index 99f11f45..ae951717 100644
--- a/cryptography/hazmat/bindings/openssl/backend.py
+++ b/cryptography/hazmat/bindings/openssl/backend.py
@@ -207,8 +207,11 @@ class Backend(object):
elif func == self.lib.EVP_F_EVP_DECRYPTFINAL_EX:
if reason == self.lib.EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH:
raise IncorrectPadding
+
+ message = self.ffi.string(self.lib.ERR_reason_error_string(code))
raise SystemError(
- "Unknown error code from OpenSSL, you should probably file a bug"
+ "Unknown error code from OpenSSL, you should probably file a bug. "
+ "Cause: %s" % message
)
a> 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231