Add command-line argument to use a custom SSL certificate database.

This commit is contained in:
Josh Matthews 2017-04-05 16:34:16 -04:00
parent d7fb2cc27f
commit dc99104f55
7 changed files with 36 additions and 13 deletions

View file

@ -230,6 +230,9 @@ pub struct Opts {
/// Print the version and exit.
pub is_printing_version: bool,
/// Path to SSL certificates.
pub certificate_path: Option<String>,
}
fn print_usage(app: &str, opts: &Options) {
@ -566,6 +569,7 @@ pub fn default_opts() -> Opts {
webrender_record: false,
precache_shaders: false,
signpost: false,
certificate_path: None,
}
}
@ -615,6 +619,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
"A comma-separated string of debug options. Pass help to show available options.", "");
opts.optflag("h", "help", "Print this message");
opts.optopt("", "resources-path", "Path to find static resources", "/home/servo/resources");
opts.optopt("", "certificate-path", "Path to find SSL certificates", "/home/servo/resources/certs");
opts.optopt("", "content-process" , "Run as a content process and connect to the given pipe",
"servo-ipc-channel.abcdefg");
opts.optmulti("", "pref",
@ -868,6 +873,7 @@ pub fn from_cmdline_args(args: &[String]) -> ArgumentParsingResult {
webrender_record: debug_options.webrender_record,
precache_shaders: debug_options.precache_shaders,
signpost: debug_options.signpost,
certificate_path: opt_match.opt_str("certificate-path"),
};
set_defaults(opts);