Skip to content

Commit

Permalink
[MOSIP-25198] - Fix null pointer exception
Browse files Browse the repository at this point in the history
Signed-off-by: Swati Goel <[email protected]>
  • Loading branch information
swatigoel committed Nov 23, 2023
1 parent eeec9ea commit 04779df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ fileignoreconfig:
- filename: docs/images/id_pass_logo.svg
checksum: 81b14da4f42f335cf6a3094489844962b92fc629c89691487558c71c3d44a915
- filename: README.md
checksum: b01438ae6897d9a2d311ca6f68cc839cb4d8252b29d9fa7d41a0362aaecf0065
checksum: f3e7693f4f554640b93c82e438d28d015f8c09be622c22ac6847e528830968f6
- filename: .github/workflows/push-trigger.yml
checksum: 157f32aea860b6c1e1fbe4ec64588af662337fca3d815b62b6a75e1b60a59f37
checksum: e809aa956d4d0cde78118bfa518e824f128aa67ef5b1e79983b8feaa40b3690d
- filename: helm/mimoto/install.sh
checksum: d5f2e121664dc1b3d8769a36b481ddb44a4f41f410df8c55a5467f4fd53a8a99
- filename: src/main/java/io/mosip/mimoto/controller/CredentialShareController.java
Expand Down Expand Up @@ -62,7 +62,7 @@ fileignoreconfig:
- filename: src/main/java/io/mosip/mimoto/util/RestApiClient.java
checksum: 77b8afdefbb1f8ff56e140836e6713d150ac48f99c6778e43bc2854e5fcd4732
- filename: src/main/java/io/mosip/mimoto/util/JoseUtil.java
checksum: 1a9b48b950b17c14c32c2ee0c8ad0448d63da887dfb7eb82f4f0bf0b71fdeafa
checksum: 65c4d7f9d4f28e7e4e5376e4f6cdce8b49b485c3ea2ab214f72d018d5d73b6aa
- filename: src/main/java/io/mosip/mimoto/util/CryptoUtil.java
checksum: fc4b7bd41ca63b2060854e218eb50689f77162dc51c45e95f51ec0272bd3585a
- filename: src/main/java/io/mosip/mimoto/util/CryptoCoreUtil.java
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/io/mosip/mimoto/util/JoseUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,13 @@ public String getJWT(String clientId) {
String keyStorePathWithFileName = keyStorePath + fileName;
Date issuedAt = Date.from(Instant.now());
Date expiresAt = Date.from(Instant.now().plusMillis(120000));
KeyStore.PrivateKeyEntry privateKeyEntry= null;
RSAPrivateKey privateKey = null;
try {
privateKeyEntry = cryptoCoreUtil.loadP12(keyStorePathWithFileName, alias, cyptoPassword);
KeyStore.PrivateKeyEntry privateKeyEntry = cryptoCoreUtil.loadP12(keyStorePathWithFileName, alias, cyptoPassword);
privateKey = (RSAPrivateKey) privateKeyEntry.getPrivateKey();
} catch (IOException e) {
logger.error("Exception happened while loading the p12 file for invoking token call.");
}
RSAPrivateKey privateKey = (RSAPrivateKey) privateKeyEntry.getPrivateKey();
return JWT.create()
.withHeader(header)
.withIssuer(clientId)
Expand Down

0 comments on commit 04779df

Please sign in to comment.