Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

dane provides functionalities to use DNS-based Authentication of Named Entities aka DANE in standard go tls connections

License

NotificationsYou must be signed in to change notification settings

hawell/dane

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go library for DANE TLSA authentication

Usage

t:=&http.Transport{DialTLSContext:func(ctx context.Context,network,addrstring) (net.Conn,error) {dialer:=&net.Dialer{Timeout:30*time.Second,KeepAlive:30*time.Second,        }conn,err:=tls.DialWithDialer(dialer,network,addr,&tls.Config{InsecureSkipVerify:true,VerifyPeerCertificate:func(rawCerts [][]byte,verifiedChains [][]*x509.Certificate)error {returndane.VerifyPeerCertificate(network,addr,rawCerts,nil)            },        })iferr!=nil {returnconn,err        }returnconn,nil    },}client:= http.Client{Transport:t}resp,err:=client.Get("https://getfedora.org")iferr!=nil {log.Fatal(err)}fmt.Println(resp)

the only requirement is to setInsecureSkipVerify totrue and usedane.VerifyPeerCertificate() for custom verification.all dnssec query and validation are done transparently.

About

dane provides functionalities to use DNS-based Authentication of Named Entities aka DANE in standard go tls connections

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp