97 Boolean o = AccessController.doPrivileged(
98 new PrivilegedAction<Boolean>() {
99 public Boolean run() {
100 File file = new File("/usr/lib/libpkcs11.so");
101 if (file.exists() == false) {
102 return Boolean.FALSE;
103 }
104 if ("false".equalsIgnoreCase(System.getProperty
105 ("sun.security.pkcs11.enable-solaris"))) {
106 return Boolean.FALSE;
107 }
108 return Boolean.TRUE;
109 }
110 });
111 if (o == Boolean.FALSE) {
112 tries = MAX_LOAD_TRIES;
113 }
114 }
115
116 private boolean hasArgument() {
117 return argument.length() != 0;
118 }
119
120 // should we try to load this provider?
121 private boolean shouldLoad() {
122 return (tries < MAX_LOAD_TRIES);
123 }
124
125 // do not try to load this provider again
126 private void disableLoad() {
127 tries = MAX_LOAD_TRIES;
128 }
129
130 boolean isLoaded() {
131 return (provider != null);
132 }
133
134 public boolean equals(Object obj) {
135 if (this == obj) {
136 return true;
137 }
|
97 Boolean o = AccessController.doPrivileged(
98 new PrivilegedAction<Boolean>() {
99 public Boolean run() {
100 File file = new File("/usr/lib/libpkcs11.so");
101 if (file.exists() == false) {
102 return Boolean.FALSE;
103 }
104 if ("false".equalsIgnoreCase(System.getProperty
105 ("sun.security.pkcs11.enable-solaris"))) {
106 return Boolean.FALSE;
107 }
108 return Boolean.TRUE;
109 }
110 });
111 if (o == Boolean.FALSE) {
112 tries = MAX_LOAD_TRIES;
113 }
114 }
115
116 private boolean hasArgument() {
117 return !argument.isEmpty();
118 }
119
120 // should we try to load this provider?
121 private boolean shouldLoad() {
122 return (tries < MAX_LOAD_TRIES);
123 }
124
125 // do not try to load this provider again
126 private void disableLoad() {
127 tries = MAX_LOAD_TRIES;
128 }
129
130 boolean isLoaded() {
131 return (provider != null);
132 }
133
134 public boolean equals(Object obj) {
135 if (this == obj) {
136 return true;
137 }
|