// TODO: maybe more logic can be pulled up here public IResponse ProcessContAuthResponse(IXdrReader xdr) { var operation = xdr.ReadOperation(); var response = GdsConnection.ProcessOperation(operation, xdr); GdsConnection.HandleResponseException(response); if (response is ContAuthResponse) { return(response); } else if (response is CryptKeyCallbackResponse) { return(response); } else if (response is GenericResponse genericResponse) { ServerKeys = genericResponse.Data; Complete(); } else { throw new InvalidOperationException($"Unexpected response ({operation})."); } return(response); }
public void ProcessWireCryptResponse(IXdrReader xdr, GdsConnection connection) { if (WireCrypt == WireCryptOption.Disabled) { return; } // after writing before reading connection.StartEncryption(); var response = GdsConnection.ProcessOperation(xdr.ReadOperation(), xdr); GdsConnection.HandleResponseException(response); WireCryptInitialized = true; }