-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathListServices.java
More file actions
25 lines (21 loc) · 864 Bytes
/
ListServices.java
File metadata and controls
25 lines (21 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import java.security.*;
public class ListServices {
public static void main(String args[]) {
String providerName = null;
try {
providerName = args[0];
} catch(ArrayIndexOutOfBoundsException aio) {
System.out.println("Usage :-");
System.out.println("java ListServices <Provider_Name>");
System.exit(1);
}
Provider prod = Security.getProvider(args[0]);
if(prod==null) {
System.out.println("Provider not found.");
System.exit(1);
}
for(Provider.Service srv:prod.getServices()) {
System.out.println(srv);
}
}
}