Skip to content

Commit

Permalink
Use cancellable crypto RNG from u-root
Browse files Browse the repository at this point in the history
Fixes #246

Signed-off-by: Andrea Barberio <[email protected]>
  • Loading branch information
insomniacslk committed Apr 3, 2019
1 parent 68ad195 commit 625d653
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion dhcpv4/dhcpv4.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package dhcpv4

import (
"bytes"
"crypto/rand"
"errors"
"fmt"
"net"
Expand All @@ -26,6 +25,7 @@ import (

"github.com/insomniacslk/dhcp/iana"
"github.com/insomniacslk/dhcp/rfc1035label"
"github.com/u-root/u-root/pkg/rand"
"github.com/u-root/u-root/pkg/uio"
)

Expand Down
5 changes: 2 additions & 3 deletions dhcpv6/dhcpv6_test.go
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
package dhcpv6

import (
"crypto/rand"
"encoding/binary"
"errors"
"net"
"testing"

"github.com/insomniacslk/dhcp/iana"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"

"github.com/insomniacslk/dhcp/iana"
"github.com/u-root/u-root/pkg/rand"
)

func randomReadMock(value []byte, n int, err error) func([]byte) (int, error) {
Expand Down
2 changes: 1 addition & 1 deletion dhcpv6/dhcpv6message.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package dhcpv6

import (
"crypto/rand"
"errors"
"fmt"
"net"
"time"

"github.com/insomniacslk/dhcp/iana"
"github.com/u-root/u-root/pkg/rand"
"github.com/u-root/u-root/pkg/uio"
)

Expand Down

0 comments on commit 625d653

Please sign in to comment.