File tree Expand file tree Collapse file tree 2 files changed +21
-20
lines changed Expand file tree Collapse file tree 2 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -197,26 +197,6 @@ Please refer to [1] for more details.
197
197
(rfc4251 :encode :string " " s))
198
198
(rfc4251 :encode :buffer (rfc4251 :get-binary-stream-bytes s) stream )))
199
199
200
- (defmethod rfc4251 :decode ((type (eql :cert-signature )) stream &key )
201
- " Decode certificate key signature"
202
- (let* ((type-data (multiple-value-list (rfc4251 :decode :string stream )))
203
- (blob-data (multiple-value-list (rfc4251 :decode :buffer stream )))
204
- (type (first type-data))
205
- (blob (first blob-data))
206
- (total (+ (second type-data) (second blob-data)))
207
- (signature-type (get-signature-type-or-lose type ))
208
- (signature (make-instance ' signature
209
- :type signature-type
210
- :blob blob)))
211
- (values signature total)))
212
-
213
- (defmethod rfc4251 :encode ((type (eql :cert-signature )) (value signature) stream &key )
214
- " Encode certificate signature into the given stream"
215
- (with-accessors ((type signature-type) (blob signature-blob)) value
216
- (let ((type-name (getf type :name )))
217
- (+ (rfc4251 :encode :string type-name stream )
218
- (rfc4251 :encode :buffer blob stream )))))
219
-
220
200
(defclass certificate (base-public-key)
221
201
((nonce
222
202
:initarg :nonce
Original file line number Diff line number Diff line change 70
70
:initform (error " Must specify signature blob" )
71
71
:documentation " Computed signature blob" ))
72
72
(:documentation " Certificate signature" ))
73
+
74
+
75
+ (defmethod rfc4251 :decode ((type (eql :cert-signature )) stream &key )
76
+ " Decode certificate key signature from the given binary stream"
77
+ (let* ((type-data (multiple-value-list (rfc4251 :decode :string stream )))
78
+ (blob-data (multiple-value-list (rfc4251 :decode :buffer stream )))
79
+ (type (first type-data))
80
+ (blob (first blob-data))
81
+ (total (+ (second type-data) (second blob-data)))
82
+ (signature-type (get-signature-type-or-lose type ))
83
+ (signature (make-instance ' signature
84
+ :type signature-type
85
+ :blob blob)))
86
+ (values signature total)))
87
+
88
+ (defmethod rfc4251 :encode ((type (eql :cert-signature )) (value signature) stream &key )
89
+ " Encode certificate signature into the given stream"
90
+ (with-accessors ((type signature-type) (blob signature-blob)) value
91
+ (let ((type-name (getf type :name )))
92
+ (+ (rfc4251 :encode :string type-name stream )
93
+ (rfc4251 :encode :buffer blob stream )))))
You can’t perform that action at this time.
0 commit comments