BigFix User Group

You are not logged in.

#1 2009-10-28 16:54:45

jpg
New member
Registered: 2009-10-28
Posts: 2

newbie question with BESAPI.SigningKeys

Hi,
I'm trying to get a project going. We're having troubles starting with the client examples (TestAPI.htm) and setting up our infrastructure. I'm trying to validate my publisher.pvk, publisher.crt, and license.crt with a BESAPI.SigningKeys ActiveXObject. I can set the paths successfully, but I'm running into troubles querying AreSigningKeysValid. I'm sure it's a misconfig issue (hopefully).

I'm receiving the following DiagnosticMessage: These signing keys are not valid. They may be inconsistent with the database you are connecting to, may be for a different operator, or may have been revoked. Please verify that you have selected valid key and license files and try again.

I'm setting up the call as follows:
function CheckSigningKeys()
{
    var sk = new ActiveXObject("BESAPI.SigningKeys");
    var folder = window.prompt("Signing Key Folder Path for user bigfix (must include trailing slash): ");
    sk.SetPrivateKeyPath("john",folder + "publisher.pvk");
    sk.SetPublisherCertPath("john",folder + "publisher.crt");
    sk.SetLicenseCertPath("john",folder + "license.crt");
    if (sk.AreSigningKeysValid("john",window.prompt("Password for user bigfix: ")))
    {
        window.alert("Valid!");
    } else {
        var msg = "Diagnostic Message: " + sk.DiagnosticMessage;
        if (msg != "Diagnostic Message: ") {
            window.alert(msg);
        }
    }
}


Now, if I pass an invalid password, I receive a different DiagnosticMessage. I've verified that these are indeed my publisher files. I'm pointing to our site license, and I'm sure it is valid, and my user is active.

I'm running BES 7.0.9.164.
Any help is appreciated.

Offline

 

#2 2009-10-28 18:12:30

Ben Kus
Product Expert
From: California
Registered: 2006-07-18
Posts: 4571
Website

Re: newbie question with BESAPI.SigningKeys

BigFix 7.0.9? You really should consider upgrading to 7.2.5...

Try setting the DSN values before you call your functions:


var dsnname = "bes_bfenterprise";
sk.SetDefaultDSN(dsnname);


Ben

Offline

 

#3 2009-10-28 18:40:51

jpg
New member
Registered: 2009-10-28
Posts: 2

Re: newbie question with BESAPI.SigningKeys

Thanks Ben,
The DSN Values are set up in another part of the program. Thanks for the tip, but I'm not sure it's relevant here within this function... Anyway, no change. I still receive the same DiagnosticMessage.

I don't suppose there's any way to know which file AreSigningKeysValid is barfing on? I've tried interspersing lookups on DiagnosticMessage as I set each path, but it's null until I enter the if block.

I'll put an ugrade on the table but was really looking for a working example of BESAPI.

Thanks!
John

Last edited by jpg (2009-10-28 18:41:23)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2008 PunBB