We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0013ac5 commit 2407bb6Copy full SHA for 2407bb6
1 file changed
s2a/src/main/java/io/grpc/s2a/S2AChannelCredentials.java
@@ -151,8 +151,17 @@ public ChannelCredentials build() throws IOException {
151
checkState(!isNullOrEmpty(trustBundlePath), "trustBundlePath must not be null or empty.");
152
153
File privateKeyFile = new File(privateKeyPath);
154
+ if (!privateKeyFile.exists()) {
155
+ throw new IOException(privateKeyPath + " does not exist");
156
+ }
157
File certChainFile = new File(certChainPath);
158
+ if (!certChainFile.exists()) {
159
+ throw new IOException(certChainPath + " does not exist");
160
161
File trustBundleFile = new File(trustBundlePath);
162
+ if (!trustBundleFile.exists()) {
163
+ throw new IOException(trustBundlePath + " does not exist");
164
165
166
s2aChannelCredentials =
167
TlsChannelCredentials.newBuilder()
0 commit comments