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

AdvancedTls: add functions to load credentials from static files #8525

Merged
merged 4 commits into from Sep 17, 2021

Conversation

ZhenLian
Copy link
Contributor

Add two functions in AdvancedTls classes to load credentials from static files, making it easier to use for users who don't have the need to periodically refresh their credentials.

@@ -141,6 +141,22 @@ public Closeable updateIdentityCredentialsFromFile(File keyFile, File certFile,
};
}

/**
* Loads the private key and certificate chains from the local file paths. The contents are only
* read at the construction time and won't be updated afterwards.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"construction time" doesn't seem right.

* @param keyFile the file on disk holding the private key
* @param certFile the file on disk holding the certificate chain
*/
public void loadIdentityCredentialsFromFile(File keyFile, File certFile) throws IOException,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this should also be named with "update" in its name. Update vs load isn't a useful distinction, especially since updateIdentityCredentials() is also one-shot.

@ZhenLian
Copy link
Contributor Author

@ejona86 Thanks a lot for the review!

@ZhenLian ZhenLian merged commit 838438c into grpc:master Sep 17, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants