(retry *default-zone-retry*)
(expire *default-zone-expire*)
(min-ttl *default-zone-min-ttl*)
- (ttl min-ttl)
+ (ttl *default-zone-ttl*)
(serial (make-zone-serial raw-zname))
&aux
(zname (zone-parse-host raw-zname root-domain)))
(= (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 ()
(rec-name host))
33)
+(defenum caa-flag () (:critical 128))
+
+(defzoneparse :caa (name data rec)
+ ":caa ((TAG VALUE FLAG*)*)"
+ (dolist (prop data)
+ (destructuring-bind (tag value &rest flags) prop
+ (setf flags (reduce #'logior
+ (mapcar (lambda (item)
+ (lookup-enum 'caa-flag item
+ :min 0 :max 255))
+ flags)))
+ (ecase tag
+ ((:issue :issuewild :iodef)
+ (rec :name name
+ :data (list flags tag value)))))))
+
+(defmethod zone-record-rrdata ((type (eql :caa)) zr)
+ (destructuring-bind (flags tag value) (zr-data zr)
+ (rec-u8 flags)
+ (rec-string (string-downcase tag))
+ (rec-raw-string value))
+ 257)
+
(defzoneparse :net (name data rec)
":net (NETWORK*)"
(dolist (net (listify data))
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)
(bind-format-record zr "~2D ~2D ~2D " usage selector match)
(bind-write-hex data 12)))
+(defmethod zone-write-record ((format (eql :bind)) (type (eql :caa)) zr)
+ (destructuring-bind (flags tag value) (zr-data zr)
+ (bind-format-record zr "~3D ~(~A~) ~S~%" flags tag value)))
+
(defmethod zone-write-record ((format (eql :bind)) (type (eql :ds)) zr)
(destructuring-bind (tag alg hashtype hash) (zr-data zr)
(bind-format-record zr "~5D ~2D ~2D " tag alg hashtype)