@@ -13,7 +13,7 @@ use crate::proto::{Error, Result};
1313#[ derive( Clone , PartialEq , Debug ) ]
1414pub struct Identity {
1515 /// A standard public-key encoding of an underlying key.
16- pub pubkey : PublicCredential ,
16+ pub credential : PublicCredential ,
1717
1818 /// A human-readable comment
1919 pub comment : String ,
@@ -36,24 +36,27 @@ impl Decode for Identity {
3636 type Error = Error ;
3737
3838 fn decode ( reader : & mut impl Reader ) -> Result < Self > {
39- let pubkey = reader. read_prefixed ( PublicCredential :: decode) ?;
39+ let credential = reader. read_prefixed ( PublicCredential :: decode) ?;
4040 let comment = String :: decode ( reader) ?;
4141
42- Ok ( Self { pubkey, comment } )
42+ Ok ( Self {
43+ credential,
44+ comment,
45+ } )
4346 }
4447}
4548
4649impl Encode for Identity {
4750 fn encoded_len ( & self ) -> ssh_encoding:: Result < usize > {
4851 [
49- self . pubkey . encoded_len_prefixed ( ) ?,
52+ self . credential . encoded_len_prefixed ( ) ?,
5053 self . comment . encoded_len ( ) ?,
5154 ]
5255 . checked_sum ( )
5356 }
5457
5558 fn encode ( & self , writer : & mut impl Writer ) -> ssh_encoding:: Result < ( ) > {
56- self . pubkey . encode_prefixed ( writer) ?;
59+ self . credential . encode_prefixed ( writer) ?;
5760 self . comment . encode ( writer) ?;
5861
5962 Ok ( ( ) )
0 commit comments