WithHelloRandomBytesGenerator sets the hello random bytes generator. Returns an error if the generator is nil.
(fn func() [handshake.RandomBytesLength]byte)
| 543 | // WithHelloRandomBytesGenerator sets the hello random bytes generator. |
| 544 | // Returns an error if the generator is nil. |
| 545 | func WithHelloRandomBytesGenerator(fn func() [handshake.RandomBytesLength]byte) Option { |
| 546 | return sharedOption(func(c *dtlsConfig) error { |
| 547 | if fn == nil { |
| 548 | return errNilHelloRandomBytesGenerator |
| 549 | } |
| 550 | c.helloRandomBytesGenerator = fn |
| 551 | |
| 552 | return nil |
| 553 | }) |
| 554 | } |
| 555 | |
| 556 | // WithClientHelloMessageHook sets the client hello message hook. |
| 557 | // Returns an error if the hook is nil. |
searching dependent graphs…