example.com. IN CAA 0 issue ";"
example.com. IN CAA 0 issuewild "letsencrypt.org"
表示example.com的SSL憑證是由Let's Encrypt機構所發出
在DNS伺服器設定好CAA紀錄, 但是如何查詢呢? 常用的dig工具用法:
dig example.com type257
不過dig只會回應編碼資料
在Github上有個專案"dnscaa"正好可以解決這個問題, 它是由Golang寫成, 所以我們需要Golang編譯此程式, 這裡我使用Debian Linux Jessie示範
安裝Golang
Debian Linux Jessie的Golang是1.3.3版, 無法順利編譯dnscaa, 所以我們需要用Jessie-Backports來取得較新版的Golang
增加Jessie-Backports
nano /etc/apt/sources.list
加入設定
deb http://ftp.tw.debian.org/debian/ jessie-backports main
更新Sources List
apt-get update
安裝Golang 1.7
apt-get -t jessie-backports install golang
下載dnscaa原始碼
dnscaa還需要Golang dns函式庫, 先在https://github.com/miekg/dns下載
cd /usr/lib/go/src
mkdir -p github.com/miekg
cd github.com/miekg
git clone https://github.com/miekg/dns.git dns
接著下載dnscaa(https://github.com/weppos/dnscaa)
cd /usr/lib/go/src
mkdir -p github.com/weppos
cd github.com/weppos
git clone https://github.com/weppos/dnscaa.git dnscaa
編譯dnscaa
go build cmd/digcaa/digcaa.go
這時/usr/lib/go/src/github.com/weppos/目錄下就會出現編譯好的dnscaa工具
使用dnscaa
./dnscaa example.com
若example.com有正確設定DNS CAA紀錄, 就會顯示其資料