feat: v1.4.1
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use std::fs;
|
||||
use std::collections::BTreeMap;
|
||||
|
||||
use clap::{App, Arg, ArgMatches, SubCommand};
|
||||
@@ -5,6 +6,7 @@ use openssl::encrypt::Encrypter;
|
||||
use openssl::pkey::PKey;
|
||||
use openssl::rsa::Rsa;
|
||||
use rust_util::util_clap::{Command, CommandError};
|
||||
use rust_util::util_msg;
|
||||
|
||||
use crate::digest::sha256_bytes;
|
||||
|
||||
@@ -26,10 +28,10 @@ impl Command for CommandImpl {
|
||||
|
||||
fn run(&self, _arg_matches: &ArgMatches, sub_arg_matches: &ArgMatches) -> CommandError {
|
||||
let json_output = sub_arg_matches.is_present("json");
|
||||
if json_output { rust_util::util_msg::set_logger_std_out(false); }
|
||||
if json_output { util_msg::set_logger_std_out(false); }
|
||||
|
||||
let pub_key_in = opt_value_result!(sub_arg_matches.value_of("pub-key-in"), "Require public key in");
|
||||
let pub_key_bytes = opt_result!(std::fs::read(pub_key_in), "Read file: {}, failed: {}", pub_key_in);
|
||||
let pub_key_bytes = opt_result!(fs::read(pub_key_in), "Read file: {}, failed: {}", pub_key_in);
|
||||
|
||||
let padding_opt = sub_arg_matches.value_of("padding");
|
||||
let padding = crate::rsautil::parse_padding(padding_opt)?;
|
||||
|
||||
Reference in New Issue
Block a user