add struct for pubkey representation
This commit is contained in:
26
pubKeyRep.go
Normal file
26
pubKeyRep.go
Normal file
@@ -0,0 +1,26 @@
|
||||
package dkim
|
||||
|
||||
import (
|
||||
"crypto/rsa"
|
||||
"fmt"
|
||||
"net"
|
||||
)
|
||||
|
||||
// pubKeyRep represents a parsed version of public key record
|
||||
type pubKeyRep struct {
|
||||
Version string
|
||||
HashAlgo []string
|
||||
KeyType string
|
||||
Note string
|
||||
PubKey rsa.PublicKey
|
||||
ServiceType []string
|
||||
FlagTesting bool // flag y
|
||||
FlagIMustBeD bool // flag i
|
||||
}
|
||||
|
||||
func newPubKeyFromDnsTxt(selector, domain string) (*pubKeyRep, error) {
|
||||
txt, err := net.LookupTXT(selector + "._domainkey." + domain)
|
||||
fmt.Println(txt, err)
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
Reference in New Issue
Block a user