mirror of https://github.com/ctz/rustls
parent
5a06734777
commit
d6176ed6ac
|
@ -8,8 +8,11 @@ publish = false
|
|||
[package.metadata]
|
||||
cargo-fuzz = true
|
||||
|
||||
[dependencies]
|
||||
webpki = "0.21.0"
|
||||
|
||||
[dependencies.rustls]
|
||||
path = ".."
|
||||
path = "../rustls"
|
||||
[dependencies.libfuzzer-sys]
|
||||
git = "https://github.com/rust-fuzz/libfuzzer-sys.git"
|
||||
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
#[macro_use] extern crate libfuzzer_sys;
|
||||
extern crate rustls;
|
||||
|
||||
use rustls::{ServerConfig, ServerSession, Session};
|
||||
use rustls::{ServerConfig, ServerSession, Session, NoClientAuth};
|
||||
use std::io;
|
||||
use std::sync::Arc;
|
||||
|
||||
fuzz_target!(|data: &[u8]| {
|
||||
let config = Arc::new(ServerConfig::new());
|
||||
let config = Arc::new(ServerConfig::new(NoClientAuth::new()));
|
||||
let mut server= ServerSession::new(&config);
|
||||
let _ = server.read_tls(&mut io::Cursor::new(data));
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue