Skip to content

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

Merged
ZhenLian merged 4 commits intogrpc:masterfrom
ZhenLian:zhen_advancedtls_6
Sep 17, 2021
Merged

AdvancedTls: add functions to load credentials from static files#8525
ZhenLian merged 4 commits intogrpc:masterfrom
ZhenLian:zhen_advancedtls_6

Conversation

@ZhenLian
Copy link
Copy Markdown
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.

@ZhenLian ZhenLian requested a review from ejona86 September 14, 2021 00:12

/**
* 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

2 participants