@@ -62,6 +62,7 @@ public class NistValidationService {
6262 private static final int DEFAULT_SP80022_MAX_BYTES = 12_500_000 ;
6363 private static final long DEFAULT_SP80022_MIN_BITS = 1_000_000L ;
6464 private static final int DEFAULT_SP80090B_MAX_BYTES = 1_000_000 ;
65+ private static final Duration NIST_GRPC_TIMEOUT = Duration .ofMinutes (45 );
6566 private static final ObjectMapper JSON_MAPPER = new ObjectMapper ();
6667 private static final Metadata .Key <String > AUTHORIZATION_KEY =
6768 Metadata .Key .of ("authorization" , Metadata .ASCII_STRING_MARSHALLER );
@@ -647,15 +648,15 @@ private Sp80022TestResponse runSp80022Tests(byte[] bitstream, String bearerToken
647648
648649 try {
649650 if (clientOverride != null ) {
650- return clientOverride .runTestSuite (request ).await ().atMost (Duration . ofMinutes ( 10 ) );
651+ return clientOverride .runTestSuite (request ).await ().atMost (NIST_GRPC_TIMEOUT );
651652 }
652653
653654 var client = sp80022Client ;
654655 String token = resolveToken (bearerToken , "NIST SP 800-22" );
655656 if (token != null ) {
656657 client = withBearerToken (client , token );
657658 }
658- return client .runTestSuite (request ).await ().atMost (Duration . ofMinutes ( 10 ) );
659+ return client .runTestSuite (request ).await ().atMost (NIST_GRPC_TIMEOUT );
659660
660661 } catch (StatusRuntimeException e ) {
661662 if (e .getStatus ().getCode () == Status .Code .UNAVAILABLE ) {
@@ -1004,15 +1005,15 @@ private Sp80090bOutcome assess90B(
10041005 sp80090bOverride
10051006 .assessEntropy (request )
10061007 .await ()
1007- .atMost (Duration . ofMinutes ( 10 ) );
1008+ .atMost (NIST_GRPC_TIMEOUT );
10081009 } else {
10091010 var client = sp80090bClient ;
10101011 String token = resolveToken (bearerToken , "NIST SP 800-90B" );
10111012 if (token != null ) {
10121013 client = withBearerToken (client , token );
10131014 }
10141015 entropyResult =
1015- client .assessEntropy (request ).await ().atMost (Duration . ofMinutes ( 10 ) );
1016+ client .assessEntropy (request ).await ().atMost (NIST_GRPC_TIMEOUT );
10161017 }
10171018 } catch (StatusRuntimeException e ) {
10181019 if (e .getStatus ().getCode () == Status .Code .UNAVAILABLE ) {
0 commit comments