void
doAuthenticate()
throws
FlexlmException {
final
byte
[] buildCryptBuffer =
this
.buildCryptBuffer();
final
boolean
b =
this
.signature2 !=
null
;
final
boolean
b2 =
this
.signature1 !=
null
;
if
(!b2 && !b) {
throw
new
FlexlmLicenseElementException(-
516
,
4035
,
this
.filename,
this
.lineNumber,
this
.lineText,
this
.name);
}
boolean
authentic =
true
;
try
{
if
(LicenseElement.urlList ==
null
&& LicenseElement.loadfromURL) {
final
Properties properties =
new
Properties();
final
InputStream systemResourceAsStream = ClassLoader.getSystemResourceAsStream(
"FlexnetPublisher.properties"
);
if
(systemResourceAsStream !=
null
) {
properties.load(systemResourceAsStream);
final
String property = properties.getProperty(
"CerticomJarPath"
);
if
(property !=
null
) {
LicenseElement.urlList =
new
URL[] {
new
File(property +
"/"
+
"EccpressoAll.jar"
).toURL() };
}
}
}
}
catch
(
final
NullPointerException ex) {}
catch
(
final
MalformedURLException ex2) {}
catch
(
final
IOException ex3) {}
if
(LicenseElement.urlList !=
null
) {
LicenseElement.loadfromURL =
true
;
if
(b) {
authentic = PriKeyURL.pubkeyVerify(buildCryptBuffer, hexToBinBytes(
this
.signature2),
this
.vInfo,
this
.strength, LicenseElement.urlList);
}
if
(!authentic && b2) {
authentic = PriKeyURL.pubkeyVerify(buildCryptBuffer, hexToBinBytes(
this
.signature1),
this
.vInfo,
this
.strength, LicenseElement.urlList);
}
}
else
{
LicenseElement.loadfromURL =
false
;
if
(b) {
authentic = PriKey.pubkeyVerify(buildCryptBuffer, hexToBinBytes(
this
.signature2),
this
.vInfo,
this
.strength);
}
if
(!authentic && b2) {
authentic = PriKey.pubkeyVerify(buildCryptBuffer, hexToBinBytes(
this
.signature1),
this
.vInfo,
this
.strength);
}
}
this
.authentic = authentic;
this
.authenticationAttempted =
true
;
if
(!authentic) {
throw
new
FlexlmLicenseElementException(-
8
,
4048
,
this
.filename,
this
.lineNumber,
this
.lineText,
this
.name);
}
}