package org.jboss.wsf.test;

/**
 *
 * @author Rostislav Svoboda
 */
public class CryptoCheckMain
{

    public static void main(String[] args) throws Exception 
    {
        System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
        System.out.println("JCE unlimited strength cryptography:   " + ((javax.crypto.Cipher.getMaxAllowedKeyLength("RC5") < 256)?"NOT ":"") + "INSTALLED" );
        System.out.println("Bouncy Castle JCE Provider:            " + ((java.security.Security.getProvider("BC") == null)?"NOT ":"") + "INSTALLED" );
        System.out.println("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX");
    }

}


@@ -22,16 +22,48 @@
 .test;%0A%0A
+import java.security.Provider;%0A%0A
 /**%0A *%0A 
@@ -455,150 +455,407 @@
     
-System.out.println(%22Bouncy Castle JCE Provider:            %22 + ((java.security.Security.getProvider(%22BC%22) == null)?%22NOT %22:%22%22) + %22INSTALLED%22 );
+Provider p = java.security.Security.getProvider(%22BC%22);%0A        if (p != null) %7B%0A           System.out.println(%22Bouncy Castle JCE Provider:            INSTALLED (ver: %22 + p.getVersion() + %22, %22 +%0A              p.getClass().getProtectionDomain().getCodeSource().getLocation() + %22)%22 );%0A        %7D else %7B%0A           System.out.println(%22Bouncy Castle JCE Provider:            NOT INSTALLED%22 );   %0A        %7D
 %0A   

Print BC version and jar location