Documentation
¶
Index ¶
- Variables
- func BigInt(s string) (*big.Int, error)
- func CalculateRecordHash(record *hyper.SignedChangeRecord) error
- func CloseChannels(channels []hyper.Channel) error
- func GetChannelSettingsAndDefinition(settings *hyper.Settings, name string) (*hyper.ChannelSettings, *hyper.ChannelDefinition, error)
- func GetRecordFingerprint(records []*hyper.SignedChangeRecord, name, keyUsage string) string
- func InitializeChannels(broker hyper.MessageBroker, directory hyper.Directory, ...) ([]hyper.Channel, error)
- func InitializeDatastore(settings *hyper.DatastoreSettings, definitions *hyper.Definitions) (hyper.Datastore, error)
- func InitializeDirectory(settings *hyper.Settings) (hyper.Directory, error)
- func InitializeMessageBroker(settings *hyper.Settings, directory hyper.Directory) (hyper.MessageBroker, error)
- func IntegrateChangeRecord(record *hyper.SignedChangeRecord, entry *hyper.DirectoryEntry) error
- func LoadCertificate(path string, verifyUsage bool) (*x509.Certificate, error)
- func LoadCertificateFromString(data string, verifyUsage bool) (*x509.Certificate, error)
- func LoadPrivateKey(path string) (*ecdsa.PrivateKey, error)
- func LoadSignedData(data []byte) (*hyper.SignedData, error)
- func OpenChannels(broker hyper.MessageBroker, directory hyper.Directory, ...) ([]hyper.Channel, error)
- func RandomBytes(n int) ([]byte, error)
- func RandomID(n int) ([]byte, error)
- func RealSettingsPaths(envSettingsName string) ([]string, error)
- func Settings(settingsPaths []string, fs fs.FS, definitions *hyper.Definitions) (*hyper.Settings, error)
- func SettingsPaths(envSettingsName string) ([]string, fs.FS, error)
- func Sign(data interface{}, key *ecdsa.PrivateKey, cert *x509.Certificate) (*hyper.SignedData, error)
- func StructuredHash(source interface{}) ([]byte, error)
- func ToStringMap(value interface{}) (map[string]interface{}, error)
- func Verify(signedData *hyper.SignedData, rootCerts []*x509.Certificate, ...) (bool, error)
- func VerifyCertificate(cert, rootCert *x509.Certificate, intermediateCerts []*x509.Certificate, ...) error
- func VerifyFingerprint(cert *x509.Certificate, fingerprint string) bool
- func VerifyRecord(record *hyper.SignedChangeRecord, verifiedRecords []*hyper.SignedChangeRecord, ...) (bool, error)
- func VerifyRecordHash(record *hyper.SignedChangeRecord) (bool, error)
- type CertificatesList
- type CustomHashValue
- type SubjectInfo
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var CertificatesListForm = forms.Form{ Fields: []forms.Field{ { Name: "certificates", Validators: []forms.Validator{ forms.IsOptional{Default: []interface{}{}}, forms.IsList{ Validators: []forms.Validator{ forms.IsStringMap{ Form: &hyperForms.OperatorCertificateForm, }, }, }, }, }, }, }
View Source
var NullValue = fmt.Errorf("null")
Functions ¶
func CalculateRecordHash ¶
func CalculateRecordHash(record *hyper.SignedChangeRecord) error
func CloseChannels ¶
func GetChannelSettingsAndDefinition ¶
func GetChannelSettingsAndDefinition(settings *hyper.Settings, name string) (*hyper.ChannelSettings, *hyper.ChannelDefinition, error)
func GetRecordFingerprint ¶
func GetRecordFingerprint(records []*hyper.SignedChangeRecord, name, keyUsage string) string
func InitializeChannels ¶
func InitializeDatastore ¶
func InitializeDatastore(settings *hyper.DatastoreSettings, definitions *hyper.Definitions) (hyper.Datastore, error)
func InitializeDirectory ¶
func InitializeMessageBroker ¶
func IntegrateChangeRecord ¶
func IntegrateChangeRecord(record *hyper.SignedChangeRecord, entry *hyper.DirectoryEntry) error
Integrates a record into the directory
func LoadCertificate ¶
func LoadCertificate(path string, verifyUsage bool) (*x509.Certificate, error)
func LoadCertificateFromString ¶
func LoadCertificateFromString(data string, verifyUsage bool) (*x509.Certificate, error)
func LoadPrivateKey ¶
func LoadPrivateKey(path string) (*ecdsa.PrivateKey, error)
func LoadSignedData ¶
func LoadSignedData(data []byte) (*hyper.SignedData, error)
func OpenChannels ¶
func RandomBytes ¶
func RealSettingsPaths ¶
func Sign ¶
func Sign(data interface{}, key *ecdsa.PrivateKey, cert *x509.Certificate) (*hyper.SignedData, error)
func StructuredHash ¶
Computes a hash of a structured data type that can contain various types like strings or []byte arrays. The hash reflects both the type values and the structure of the source.
func ToStringMap ¶
convert an arbitrary structure to a string map via the JSON encoding
func Verify ¶
func Verify(signedData *hyper.SignedData, rootCerts []*x509.Certificate, intermediateCerts []*x509.Certificate, name string) (bool, error)
func VerifyCertificate ¶
func VerifyCertificate(cert, rootCert *x509.Certificate, intermediateCerts []*x509.Certificate, name string) error
func VerifyFingerprint ¶
func VerifyFingerprint(cert *x509.Certificate, fingerprint string) bool
func VerifyRecord ¶
func VerifyRecord(record *hyper.SignedChangeRecord, verifiedRecords []*hyper.SignedChangeRecord, rootCerts []*x509.Certificate, intermediateCerts []*x509.Certificate) (bool, error)
func VerifyRecordHash ¶
func VerifyRecordHash(record *hyper.SignedChangeRecord) (bool, error)
Types ¶
type CertificatesList ¶
type CertificatesList struct {
Certificates []*hyper.OperatorCertificate `json:"certificates"`
}
type CustomHashValue ¶
type CustomHashValue interface {
HashValue() interface{}
}
type SubjectInfo ¶
func GetSubjectInfo ¶
func GetSubjectInfo(cert *x509.Certificate) (*SubjectInfo, error)
Click to show internal directories.
Click to hide internal directories.