@@ -68,15 +68,15 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
68
68
(format stream " Unspecified error ~A on handle ~A "
69
69
(ssl-error-ret condition )
70
70
(ssl-error-handle condition ))
71
- (format-ssl-error-queue stream condition ))))
71
+ (format-ssl-error-queue stream condition ))))
72
72
73
73
(define-condition ssl-error-initialize (ssl-error)
74
74
((reason :initarg :reason
75
75
:reader ssl-error-reason))
76
76
(:report (lambda (condition stream )
77
77
(format stream " SSL initialization error: ~A "
78
78
(ssl-error-reason condition ))
79
- (format-ssl-error-queue stream condition ))))
79
+ (format-ssl-error-queue stream condition ))))
80
80
81
81
82
82
(define-condition ssl-error-want-something (ssl-error/handle)
@@ -92,7 +92,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
92
92
(format stream " The TLS/SSL operation on handle ~A completed (return code: ~A ). "
93
93
(ssl-error-handle condition )
94
94
(ssl-error-ret condition ))
95
- (format-ssl-error-queue stream condition ))))
95
+ (format-ssl-error-queue stream condition ))))
96
96
97
97
; ; SSL_ERROR_ZERO_RETURN
98
98
(define-condition ssl-error-zero-return (ssl-error/handle)
@@ -108,7 +108,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
108
108
(format stream " The TLS/SSL connection on handle ~A has been closed (return code: ~A ). "
109
109
(ssl-error-handle condition )
110
110
(ssl-error-ret condition ))
111
- (format-ssl-error-queue stream condition ))))
111
+ (format-ssl-error-queue stream condition ))))
112
112
113
113
; ; SSL_ERROR_WANT_READ
114
114
(define-condition ssl-error-want-read (ssl-error-want-something)
@@ -127,7 +127,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
127
127
(format stream " The TLS/SSL operation on handle ~A did not complete: It wants a READ (return code: ~A ). "
128
128
(ssl-error-handle condition )
129
129
(ssl-error-ret condition ))
130
- (format-ssl-error-queue stream condition ))))
130
+ (format-ssl-error-queue stream condition ))))
131
131
132
132
; ; SSL_ERROR_WANT_WRITE
133
133
(define-condition ssl-error-want-write (ssl-error-want-something)
@@ -146,7 +146,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
146
146
(format stream " The TLS/SSL operation on handle ~A did not complete: It wants a WRITE (return code: ~A ). "
147
147
(ssl-error-handle condition )
148
148
(ssl-error-ret condition ))
149
- (format-ssl-error-queue stream condition ))))
149
+ (format-ssl-error-queue stream condition ))))
150
150
151
151
; ; SSL_ERROR_WANT_CONNECT
152
152
(define-condition ssl-error-want-connect (ssl-error-want-something)
@@ -165,7 +165,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
165
165
(format stream " The TLS/SSL operation on handle ~A did not complete: It wants a connect first (return code: ~A ). "
166
166
(ssl-error-handle condition )
167
167
(ssl-error-ret condition ))
168
- (format-ssl-error-queue stream condition ))))
168
+ (format-ssl-error-queue stream condition ))))
169
169
170
170
; ; SSL_ERROR_WANT_X509_LOOKUP
171
171
(define-condition ssl-error-want-x509-lookup (ssl-error-want-something)
@@ -179,7 +179,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
179
179
(format stream " The TLS/SSL operation on handle ~A did not complete: An application callback wants to be called again (return code: ~A ). "
180
180
(ssl-error-handle condition )
181
181
(ssl-error-ret condition ))
182
- (format-ssl-error-queue stream condition ))))
182
+ (format-ssl-error-queue stream condition ))))
183
183
184
184
; ; SSL_ERROR_SYSCALL
185
185
(define-condition ssl-error-syscall (ssl-error/handle)
@@ -202,7 +202,7 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
202
202
(ssl-error-ret condition ))))
203
203
(format stream " An UNKNOWN I/O error occurred in the underlying BIO (return code: ~A ). "
204
204
(ssl-error-ret condition )))
205
- (format-ssl-error-queue stream condition ))))
205
+ (format-ssl-error-queue stream condition ))))
206
206
207
207
; ; SSL_ERROR_SSL
208
208
(define-condition ssl-error-ssl (ssl-error/handle)
@@ -212,33 +212,33 @@ by READ-SSL-ERROR-QUEUE) or an SSL-ERROR condition."
212
212
OpenSSL error queue contains more information on the error." )
213
213
(:report (lambda (condition stream )
214
214
(format stream
215
- " A failure in the SSL library occurred on handle ~A (return code: ~A ). "
215
+ " A failure in the SSL library occurred on handle ~A (return code: ~A ). "
216
216
(ssl-error-handle condition )
217
217
(ssl-error-ret condition ))
218
- (format-ssl-error-queue stream condition ))))
218
+ (format-ssl-error-queue stream condition ))))
219
219
220
220
(defun ssl-signal-error (handle syscall error-code original-error)
221
221
(let ((queue (read-ssl-error-queue)))
222
222
(if (and (eql error-code #. +ssl-error-syscall+)
223
- (not (zerop original-error)))
224
- (error ' ssl-error-syscall
225
- :handle handle
226
- :ret error-code
227
- :queue queue
228
- :syscall syscall)
223
+ (not (zerop original-error)))
224
+ (error ' ssl-error-syscall
225
+ :handle handle
226
+ :ret error-code
227
+ :queue queue
228
+ :syscall syscall)
229
229
(error (case error-code
230
- (#. +ssl-error-none+ ' ssl-error-none)
231
- (#. +ssl-error-ssl+ ' ssl-error-ssl)
232
- (#. +ssl-error-want-read+ ' ssl-error-want-read)
233
- (#. +ssl-error-want-write+ ' ssl-error-want-write)
234
- (#. +ssl-error-want-x509-lookup+ ' ssl-error-want-x509-lookup)
235
- (#. +ssl-error-zero-return+ ' ssl-error-zero-return)
236
- (#. +ssl-error-want-connect+ ' ssl-error-want-connect)
237
- (#. +ssl-error-syscall+ ' ssl-error-zero-return) ; this is intentional here. we got an EOF from the syscall (ret is 0)
238
- (t ' ssl-error/handle))
239
- :handle handle
240
- :ret error-code
241
- :queue queue))))
230
+ (#. +ssl-error-none+ ' ssl-error-none)
231
+ (#. +ssl-error-ssl+ ' ssl-error-ssl)
232
+ (#. +ssl-error-want-read+ ' ssl-error-want-read)
233
+ (#. +ssl-error-want-write+ ' ssl-error-want-write)
234
+ (#. +ssl-error-want-x509-lookup+ ' ssl-error-want-x509-lookup)
235
+ (#. +ssl-error-zero-return+ ' ssl-error-zero-return)
236
+ (#. +ssl-error-want-connect+ ' ssl-error-want-connect)
237
+ (#. +ssl-error-syscall+ ' ssl-error-zero-return) ; this is intentional here. we got an EOF from the syscall (ret is 0)
238
+ (t ' ssl-error/handle))
239
+ :handle handle
240
+ :ret error-code
241
+ :queue queue))))
242
242
243
243
(defparameter *ssl-verify-error-alist*
244
244
' ((0 :X509_V_OK )
0 commit comments