static Boolean checkConscryptIsAvailableAndUsesFipsBoringSsl() {
    try {
      Class<?> cls = Class.forName("org.conscrypt.Conscrypt");
      Method isBoringSslFipsBuild = cls.getMethod("isBoringSslFIPSBuild");
      return (Boolean) isBoringSslFipsBuild.invoke(null);
    } catch (Exception e) {
      // For older versions of Conscrypt we get a NoSuchMethodException. But no matter what goes
      // wrong, we cannot guarantee that Conscrypt uses BoringCrypto, so we will return false.
      logger.info("Conscrypt is not available or does not support checking for FIPS build.");
      return false;
    }
  }
This method is only exposed for tests and should not be used to disable the FIPS restrictions.
java_src/src/main/java/com/google/crypto/tink/config/internal/TinkFipsUtil.java