| | | 1 | | using System; |
| | | 2 | | using System.Collections.Generic; |
| | | 3 | | |
| | | 4 | | namespace Renci.SshNet.Messages.Authentication |
| | | 5 | | { |
| | | 6 | | /// <summary> |
| | | 7 | | /// Represents SSH_MSG_USERAUTH_INFO_RESPONSE message. |
| | | 8 | | /// </summary> |
| | | 9 | | [Message("SSH_MSG_USERAUTH_INFO_RESPONSE", 61)] |
| | | 10 | | internal sealed class InformationResponseMessage : Message |
| | | 11 | | { |
| | | 12 | | /// <summary> |
| | | 13 | | /// Gets authentication responses. |
| | | 14 | | /// </summary> |
| | 33 | 15 | | public List<string> Responses { get; private set; } |
| | | 16 | | |
| | | 17 | | /// <summary> |
| | | 18 | | /// Gets the size of the message in bytes. |
| | | 19 | | /// </summary> |
| | | 20 | | /// <value> |
| | | 21 | | /// <c>-1</c> to indicate that the size of the message cannot be determined, |
| | | 22 | | /// or is too costly to calculate. |
| | | 23 | | /// </value> |
| | | 24 | | protected override int BufferCapacity |
| | | 25 | | { |
| | 27 | 26 | | get { return -1; } |
| | | 27 | | } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// Initializes a new instance of the <see cref="InformationResponseMessage"/> class. |
| | | 31 | | /// </summary> |
| | 9 | 32 | | public InformationResponseMessage() |
| | 9 | 33 | | { |
| | 9 | 34 | | Responses = new List<string>(); |
| | 9 | 35 | | } |
| | | 36 | | |
| | | 37 | | /// <summary> |
| | | 38 | | /// Called when type specific data need to be loaded. |
| | | 39 | | /// </summary> |
| | | 40 | | protected override void LoadData() |
| | 0 | 41 | | { |
| | 0 | 42 | | throw new NotImplementedException(); |
| | | 43 | | } |
| | | 44 | | |
| | | 45 | | /// <summary> |
| | | 46 | | /// Called when type specific data need to be saved. |
| | | 47 | | /// </summary> |
| | | 48 | | protected override void SaveData() |
| | 9 | 49 | | { |
| | 9 | 50 | | Write((uint) Responses.Count); |
| | | 51 | | |
| | 39 | 52 | | foreach (var response in Responses) |
| | 6 | 53 | | { |
| | 6 | 54 | | Write(response); |
| | 6 | 55 | | } |
| | 9 | 56 | | } |
| | | 57 | | |
| | | 58 | | internal override void Process(Session session) |
| | 0 | 59 | | { |
| | 0 | 60 | | throw new NotImplementedException(); |
| | | 61 | | } |
| | | 62 | | } |
| | | 63 | | } |