File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,9 @@ impl SignBuilder {
156156 String :: from ( "x509" ) ,
157157 ) ) ,
158158 "ssh" => {
159+ let program = config
160+ . get_string ( "gpg.ssh.program" )
161+ . unwrap_or_else ( |_| "ssh-keygen" . to_string ( ) ) ;
159162 let ssh_signer = config
160163 . get_string ( "user.signingKey" )
161164 . ok ( )
@@ -178,7 +181,7 @@ impl SignBuilder {
178181 "ssh key setting absent" ,
179182 ) )
180183 } )
181- . and_then ( SSHSign :: new) ?;
184+ . and_then ( |key_path| SSHSign :: new ( program , key_path ) ) ?;
182185 let signer: Box < dyn Sign > = Box :: new ( ssh_signer) ;
183186 Ok ( signer)
184187 }
@@ -282,7 +285,7 @@ pub struct SSHSign {
282285
283286impl SSHSign {
284287 /// Create new [`SSHDiskKeySign`] for sign.
285- pub fn new ( mut key : PathBuf ) -> Result < Self , SignBuilderError > {
288+ pub fn new ( program : String , mut key : PathBuf ) -> Result < Self , SignBuilderError > {
286289 key. set_extension ( "" ) ;
287290 if key. is_file ( ) {
288291 #[ cfg( test) ]
@@ -294,7 +297,7 @@ impl SSHSign {
294297 } )
295298 . map ( |secret_key| Self {
296299 #[ cfg( test) ]
297- program : "ssh" . to_string ( ) ,
300+ program,
298301 #[ cfg( test) ]
299302 key_path,
300303 secret_key,
You can’t perform that action at this time.
0 commit comments