@@ -208,7 +208,7 @@ impl Session {
208208 & mut self . common . buffer ,
209209 ) ?
210210 }
211- Some ( auth_method @ auth:: Method :: OpenSshCertificate { .. } ) => {
211+ Some ( auth_method @ auth:: Method :: OpenSshCertificate { .. } ) | Some ( auth_method @ auth :: Method :: OpenSshCertificateWithHashAlg { .. } ) => {
212212 self . common . buffer . clear ( ) ;
213213 enc. client_send_signature (
214214 & self . common . auth_user ,
@@ -942,7 +942,7 @@ impl Encrypted {
942942 key. public_key( ) . to_bytes( ) ?. encode( & mut self . write) ?;
943943 true
944944 }
945- auth:: Method :: OpenSshCertificate { ref cert, .. } => {
945+ auth:: Method :: OpenSshCertificate { ref cert, .. } | auth :: Method :: OpenSshCertificateWithHashAlg { ref cert , .. } => {
946946 user. as_bytes( ) . encode( & mut self . write) ?;
947947 "ssh-connection" . encode( & mut self . write) ?;
948948 "publickey" . encode( & mut self . write) ?;
@@ -1059,6 +1059,20 @@ impl Encrypted {
10591059 self . write. extend_from_slice( & buffer[ i0..] ) ;
10601060 } )
10611061 }
1062+ auth:: Method :: OpenSshCertificateWithHashAlg { key, cert} => {
1063+ let i0 = self . client_make_to_sign (
1064+ user,
1065+ & PublicKeyOrCertificate :: Certificate ( cert. clone ( ) ) ,
1066+ buffer,
1067+ ) ?;
1068+
1069+ sign_with_hash_alg ( key, buffer) ?. encode ( & mut * buffer) ?;
1070+
1071+ push_packet ! ( self . write, {
1072+ #[ allow( clippy:: indexing_slicing) ] // length checked
1073+ self . write. extend( & buffer[ i0..] ) ;
1074+ } )
1075+ }
10621076 _ => { }
10631077 }
10641078 Ok ( ( ) )
0 commit comments