code: private SSLContext buildSSLContext(SecurityRealm realm) {
          if (realm.getAuthentication() == null || realm.getAuthentication().getTruststore() == null) {
              throw new IllegalArgumentException("No truststore configuration in security realm \"" + realm.getName() + "\".");
          }
          if (realm.getIdentities() == null || realm.getIdentities().getSsl() == null
                  || realm.getIdentities().getSsl().getKeystore() == null) {
              throw new IllegalArgumentException("No keystore configuration in security realm \"" + realm.getName() + "\".");
          }
  
          SecurityRealm.Keystore keystore = realm.getIdentities().getSsl().getKeystore();
          SecurityRealm.Truststore truststore = realm.getAuthentication().getTruststore();
  
          String keystorePassword = keystore.getPassword();
          String keyPassword = keystore.getKeyPassword();
  
          // we'll reuse PID configuration for OCSP/CRL stuff
          return buildSSLContext(keystore.getPath(), keystore.getProvider(),
                  keystorePassword, keyPassword,
                  keystore.getAlias(),
                  truststore.getPath(), truststore.getProvider(),
                  truststore.getPassword(),
                  configuration.isValidateCerts(), configuration.getCrlPath(),
                  null, // "SHA1PRNG", "NativePRNGNonBlocking", ...
                  configuration.isValidatePeerCerts(), configuration.isEnableCRLDP(), configuration.isEnableOCSP(),
                  configuration.getOcspResponderURL(),
                  configuration.getSslKeystoreProvider(),
                  configuration.getSslTrustStoreProvider(),
                  configuration.getSslProvider());
      }
docs: Build {@link SSLContext} from XML configuration
  @param realm
  @return