Documentation ¶
Index ¶
- Variables
- func B64truncate(rawMAC []byte, length int) string
- func EncodeKeyBase64(keyBytes []byte) string
- func EncodeSignatureSuffix(signatureForBody []byte, signatureForURL []byte) string
- func ExtractKeyAliasFromPublicKeyBase64(publicKeyBase64 string) string
- func ParseBase64EncodedKey(encodedKey string, length int) ([]byte, error)
- func StatusToString(status AuthenticatedConnectionProtocolStatus) string
- type AdsCertKeys
- type AdsCertPolicy
- type AuthenticatedConnectionProtocolStatus
- type AuthenticatedConnectionSignature
- func (s *AuthenticatedConnectionSignature) AddParametersForSignature(fromKey string, to string, toKey string, timestamp string, nonce string) error
- func (s *AuthenticatedConnectionSignature) CompareSignatures(signatureForBody []byte, signatureForURL []byte) (bool, bool)
- func (s *AuthenticatedConnectionSignature) EncodeMessage() string
- func (s *AuthenticatedConnectionSignature) GetAttributeArray() []string
- func (s *AuthenticatedConnectionSignature) GetAttributeFrom() string
- func (s *AuthenticatedConnectionSignature) GetAttributeInvoking() string
- func (s *AuthenticatedConnectionSignature) SetStatus(status AuthenticatedConnectionProtocolStatus)
- type ParsedPublicKey
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrParamMissingFrom = errors.New("parameter missing: from") ErrParamMissingFromKey = errors.New("parameter missing: fromKey") ErrParamMissingInvoking = errors.New("parameter missing: invoking") ErrParamMissingTo = errors.New("parameter missing: to") ErrParamMissingToKey = errors.New("parameter missing: toKey") ErrParamMissingTimestamp = errors.New("parameter missing: timestamp") ErrParamMissingNonce = errors.New("parameter missing: nonce") ErrParamMissingStatus = errors.New("parameter missing: status") ErrACSWrongNumParams = errors.New("wrong authenticated connection num params") )
View Source
var ( ErrEmptyInput = errors.New("empty input") ErrVersionPrefixOutOfOrder = errors.New("version prefix out of order") ErrVersionUnknown = errors.New("unknown version string") ErrVersionMissing = errors.New("missing version string or too many") ErrKeyAlgorithmWrongNumber = errors.New("key algorithm missing or too many") ErrHashAlgorithmWrongNumber = errors.New("hash algorithm missing or too many") ErrPublicKeysMissing = errors.New("public keys missing") ErrWrongKeySize = errors.New("wrong key size") ErrZeroValueKey = errors.New("zero-value key") ErrEmptyKey = errors.New("empty value for key") ErrUnsupportedAlgorithm = errors.New("unsupported key algorithm") ErrBase64DecodeFailure = errors.New("base64 decode failure") ErrPublicSuffixParseFailure = errors.New("public suffix parse failure") ErrNotTLDPlusOneDomain = errors.New("not a TLD plus one domain") )
Functions ¶
func B64truncate ¶
func EncodeKeyBase64 ¶
func EncodeSignatureSuffix ¶
func ParseBase64EncodedKey ¶
func StatusToString ¶ added in v0.8.0
func StatusToString(status AuthenticatedConnectionProtocolStatus) string
Types ¶
type AdsCertKeys ¶
type AdsCertKeys struct {
PublicKeys []ParsedPublicKey
}
func DecodeAdsCertKeysRecord ¶
func DecodeAdsCertKeysRecord(keysRecord string) (*AdsCertKeys, error)
type AdsCertPolicy ¶
type AdsCertPolicy struct {
CanonicalCallsignDomain string
}
func DecodeAdsCertPolicyRecord ¶
func DecodeAdsCertPolicyRecord(input string) (*AdsCertPolicy, error)
type AuthenticatedConnectionProtocolStatus ¶ added in v0.8.0
type AuthenticatedConnectionProtocolStatus int
const ( StatusUnspecified AuthenticatedConnectionProtocolStatus = iota // this status is considered and handled as an error condition StatusOK StatusDeactivated StatusTesting StatusNotYetChecked StatusErrorOnSignature StatusErrorOnDNS StatusErrorOnDNSSEC StatusErrorOnAdsCertConfigParse StatusErrorOnAdsCertConfigEval StatusErrorOnKeyValidation StatusKeyFetchPending StatusReviewPending StatusDnsReturnedRCode StatusADPFParseError StatusADCRTDParseError StatusAdvisoryOnly StatusSuppressed StatusDelayed )
func StringToStatus ¶ added in v0.8.0
func StringToStatus(s string) AuthenticatedConnectionProtocolStatus
type AuthenticatedConnectionSignature ¶
type AuthenticatedConnectionSignature struct {
// contains filtered or unexported fields
}
func DecodeAuthenticatedConnectionSignature ¶
func DecodeAuthenticatedConnectionSignature(encodedMessage string) (*AuthenticatedConnectionSignature, error)
func NewAuthenticatedConnectionSignature ¶
func NewAuthenticatedConnectionSignature(status AuthenticatedConnectionProtocolStatus, from string, invoking string) (*AuthenticatedConnectionSignature, error)
func (*AuthenticatedConnectionSignature) AddParametersForSignature ¶
func (*AuthenticatedConnectionSignature) CompareSignatures ¶
func (s *AuthenticatedConnectionSignature) CompareSignatures(signatureForBody []byte, signatureForURL []byte) (bool, bool)
func (*AuthenticatedConnectionSignature) EncodeMessage ¶
func (s *AuthenticatedConnectionSignature) EncodeMessage() string
func (*AuthenticatedConnectionSignature) GetAttributeArray ¶ added in v0.8.0
func (s *AuthenticatedConnectionSignature) GetAttributeArray() []string
func (*AuthenticatedConnectionSignature) GetAttributeFrom ¶
func (s *AuthenticatedConnectionSignature) GetAttributeFrom() string
func (*AuthenticatedConnectionSignature) GetAttributeInvoking ¶
func (s *AuthenticatedConnectionSignature) GetAttributeInvoking() string
func (*AuthenticatedConnectionSignature) SetStatus ¶ added in v0.8.0
func (s *AuthenticatedConnectionSignature) SetStatus(status AuthenticatedConnectionProtocolStatus)
type ParsedPublicKey ¶
Click to show internal directories.
Click to hide internal directories.