Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove passing privateKey to RemoteSecondary constructor #1144

Open
murali-shris opened this issue Oct 19, 2023 · 0 comments
Open

remove passing privateKey to RemoteSecondary constructor #1144

murali-shris opened this issue Oct 19, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@murali-shris
Copy link
Member

Describe the bug

Private key shouldn't be read from preferences anywhere in the atClient code

Steps to reproduce

n/a

Expected behavior

#1141
atsign-foundation/at_libraries#434
Once the above tasks are done, we can remove code which read private key from preference

  • AtClientImpl --> _init(..) remove privateKey from being passed to RemoteSecondary constructor
    _remoteSecondary ??= RemoteSecondary(_atSign, _preference!,
    atChops: atChops,
    privateKey: _preference!.privateKey,
    enrollmentId: _enrollmentId);
  • RemoteSecondary constructor
    Remove the line
    privateKey ??= preference.privateKey;
    and remove passing of privateKey to AtLookupImpl constructor
    atLookUp = AtLookupImpl(atSign, preference.rootDomain, preference.rootPort,
    privateKey: privateKey,
    cramSecret: preference.cramSecret,
    secondaryAddressFinder:
    AtClientManager.getInstance().secondaryAddressFinder,
    secureSocketConfig: secureSocketConfig,
    clientConfig: _getClientConfig());

Screenshots

No response

Smartphones

No response

Were you using an atApplication when the bug was found?

No response

Additional context

No response

@murali-shris murali-shris added the bug Something isn't working label Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants