Documentation ¶
Index ¶
Constants ¶
View Source
const ChallengeExpireTime = time.Minute * 5
View Source
const ChallengeLength = 512
View Source
const GatewayCertificateDuration = time.Hour * 97 // 4 days, lifetime of GW Certificate
View Source
const MinKeyLength = 1024
View Source
const TimeLength = 8 // length of time encoded in byte array from int64
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BootstrapperServer ¶
type BootstrapperServer struct {
// contains filtered or unexported fields
}
func NewBootstrapperServer ¶
func NewBootstrapperServer(privKey *rsa.PrivateKey) (*BootstrapperServer, error)
func (*BootstrapperServer) GetChallenge ¶
func (srv *BootstrapperServer) GetChallenge(ctx context.Context, hwId *protos.AccessGatewayID) (*protos.Challenge, error)
generate challenge in the format of [randomText : timestamp : signature] the format is designed mainly for demo/interface design, subjects to change in the future
func (*BootstrapperServer) RequestSign ¶
func (srv *BootstrapperServer) RequestSign( ctx context.Context, resp *protos.Response) (*protos.Certificate, error)
verify the response by client and return signed certificate if response is correct
Click to show internal directories.
Click to hide internal directories.