Skip to content

Commit 37d131c

Browse files
committed
fixes
1 parent ac6a9eb commit 37d131c

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ contact_links:
44
url: https://github.com/box/box-java-sdk/tree/combined-sdk/docs
55
about: Before creating an issue, I have checked that the SDK documentation doesn't solve my issue.
66
- name: API documentation
7-
url: https://developer.box.com/guides/
7+
url: https://developer.box.com/guides
88
about: Before creating an issue, I have checked that the API documentation doesn't solve my issue.
99
- name: Box Developer Forums
1010
url: https://community.box.com/box-platform-5

.github/ISSUE_TEMPLATE/question.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ Java SDK: <!-- Replace with the version of the Java SDK you're using. -->
4343
Java: <!-- Replace with the version of Java your application is running on. -->
4444

4545
[sdk-docs]: ./docs
46-
[api-docs]: https://developer.box.com/guides/
46+
[api-docs]: https://developer.box.com/guides
4747
[dev-forums]: https://community.box.com/box-platform-5
4848
[github-repo]: https://github.com/box/box-java-sdk/search?type=Issues

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -292,20 +292,30 @@ that are NOT compatible with FIPS 140-2 validated cryptographic library (`org.bo
292292
There are two ways of ensuring that decryption operation is FIPS-compiant.
293293

294294
1. You can provide a custom implementation of the `IPrivateKeyDecryptor` interface,
295-
which performs the decryption operation using FIPS-certified library of your choice. The interface requires the
296-
implementation of just one method:
295+
which performs the decryption operation using FIPS-certified library of your choice.
296+
`IPrivateKeyDecryptor` interface is availiable both in `com.box.sdk` and `com.box.sdkgen` packages.
297+
The interface requires the implementation of just one method:
297298
```java
298299
PrivateKey decryptPrivateKey(String encryptedPrivateKey, String passphrase);
299300
```
300-
After implementing the custom decryptor, you need to set your custom decryptor class in the Box Config.
301-
Below is an example of setting up a `BoxDeveloperEditionAPIConnection` with a config file and the custom decryptor.
301+
After implementing the custom decryptor, you need to set your custom decryptor class:
302+
303+
- For `com.box.sdk` package, you can set the custom decryptor in the `BoxConfig` object
304+
before creating the `BoxDeveloperEditionAPIConnection`.
302305
```java
303306
Reader reader = new FileReader(JWT_CONFIG_PATH);
304307
BoxConfig boxConfig = BoxConfig.readFrom(reader);
305308
boxConfig.setPrivateKeyDecryptor(customDecryptor);
306309
BoxDeveloperEditionAPIConnection api = BoxDeveloperEditionAPIConnection.getAppEnterpriseConnection(boxConfig);
307310
```
308311

312+
- For `com.box.sdkgen` package, you can set the custom decryptor in the `JWTConfig` object
313+
```java
314+
JWTConfig newConfig = JWTConfig.fromConfigFile(JWT_CONFIG_PATH, customDecryptor);
315+
BoxJWTAuth auth = new BoxJWTAuth(jwtConfig);
316+
BoxClient client = new BoxClient(auth);
317+
```
318+
309319
2. Alternative method is to override the Bouncy Castle libraries to the v.1.57 version,
310320
which are compatible with the FIPS 140-2 validated cryptographic library (`org.bouncycastle:bc-fips`).
311321

0 commit comments

Comments
 (0)