(= (length words) 4))
(error "Invalid SSHFP record."))
(pop words)
- (destructuring-bind (alg type fpr) words
+ (destructuring-bind (alg type fprhex) words
(rec :data (list (parse-integer alg)
(parse-integer type)
- fpr))))))))
+ (decode-hex fprhex)))))))))
(t
(dolist (item (listify data))
- (destructuring-bind (fpr &key (alg 'rsa) (type 'sha-1))
+ (destructuring-bind (fprhex &key (alg 'rsa) (type 'sha-1))
(listify item)
(rec :data (list (lookup-enum alg 'sshfp-algorithm :min 0 :max 255)
(lookup-enum type 'sshfp-type :min 0 :max 255)
- fpr)))))))
+ (decode-hex fprhex))))))))
(defmethod zone-record-rrdata ((type (eql :sshfp)) zr)
(destructuring-bind (alg type fpr) (zr-data zr)
(rec-u8 alg)
(rec-u8 type)
- (do ((i 0 (+ i 2))
- (n (length fpr)))
- ((>= i n))
- (rec-u8 (parse-integer fpr :start i :end (+ i 2) :radix 16))))
+ (rec-octet-vector fpr))
44)
(defenum tlsa-usage ()
prio weight port (bind-hostname host))))
(defmethod zone-write-record ((format (eql :bind)) (type (eql :sshfp)) zr)
- (bind-format-record zr "~{~2D ~2D ~A~}~%" (zr-data zr)))
+ (destructuring-bind (alg type fpr) (zr-data zr)
+ (bind-format-record zr "~2D ~2D " alg type)
+ (bind-write-hex fpr 12)))
(defmethod zone-write-record ((format (eql :bind)) (type (eql :tlsa)) zr)
(destructuring-bind (usage selector match data) (zr-data zr)