forked from os-autoinst/os-autoinst-distri-opensuse
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Get java test source from data_url instead of github
- Loading branch information
Showing
2 changed files
with
51 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// from https://github.com/ecki/JavaCryptoTest/blob/main/src/main/java/net/eckenfels/test/jce/JCEProviderInfo.java | ||
// package net.eckenfels.test.jce; | ||
|
||
import java.security.NoSuchAlgorithmException; | ||
import java.security.NoSuchProviderException; | ||
import java.security.Provider; | ||
import java.security.Provider.Service; | ||
import java.security.Security; | ||
|
||
public class JCEProviderInfo | ||
{ | ||
public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchProviderException | ||
{ | ||
System.out.printf("JCE Provider Info: %s %s/%s on %s %s%n", System.getProperty("java.vm.name"), | ||
System.getProperty("java.runtime.version"), | ||
System.getProperty("java.vm.version"), | ||
System.getProperty("os.name"), | ||
System.getProperty("os.version")); | ||
|
||
Provider[] ps; | ||
if (args.length > 0) | ||
{ | ||
System.out.printf("Searching for JCA Security Providers with filter=\"%s\"%n", args[0]); | ||
ps = Security.getProviders(args[0]); | ||
|
||
} else { | ||
System.out.printf("Listing all JCA Security Providers.%n"); | ||
ps = (args.length>0)?Security.getProviders(args[0]):Security.getProviders(); | ||
} | ||
if (ps == null || ps.length == 0) | ||
{ | ||
System.out.printf("No Results.%n"); | ||
return; | ||
} | ||
for(Provider p : ps) | ||
{ | ||
System.out.printf("--- Provider %s %s%n info %s%n", p.getName(), p.getVersion(), p.getInfo()); | ||
for(Service s : p.getServices()) | ||
{ | ||
System.out.printf(" + %s.%s : %s (%s)%n tostring=%s%n", s.getType(), s.getAlgorithm(), s.getClassName(), s.getProvider().getName(), s.toString()); | ||
} | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters