aboutsummaryrefslogtreecommitdiff
path: root/src/crypto/internal/boring/notboring.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/crypto/internal/boring/notboring.go')
-rw-r--r--src/crypto/internal/boring/notboring.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/crypto/internal/boring/notboring.go b/src/crypto/internal/boring/notboring.go
index 42c10c667b..9aa25ddc7b 100644
--- a/src/crypto/internal/boring/notboring.go
+++ b/src/crypto/internal/boring/notboring.go
@@ -15,3 +15,11 @@ func Unreachable() {}
// UnreachableExceptTests marks code that should be unreachable
// when BoringCrypto is in use. It is a no-op without BoringCrypto.
func UnreachableExceptTests() {}
+
+type randReader int
+
+func (randReader) Read(b []byte) (int, error) {
+ panic("boringcrypto: not available")
+}
+
+const RandReader = randReader(0)