Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[CB-4913] Updates warnings to check for BBID token
Reviewed by Bryan Higgins <bhiggins@blackberry.com>
Tested by Jenny Gee <jgee@blackberry.com>
  • Loading branch information
Jeffrey Heifetz authored and bryanhiggins committed Oct 1, 2013
1 parent e571745 commit 0924d911ae112816661d333953fa46d57bdc1de2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
@@ -17,7 +17,6 @@ var check = require('validator').check,
sanitize = require('validator').sanitize,
localize = require("./localize"),
logger = require("./logger"),
signingHelper = require("./signing-helper"),
path = require("path"),
fs = require("fs"),
packagerUtils = require("./packager-utils"),
@@ -35,6 +34,7 @@ _self = {
var keysFound = session.keystore,
cskFound = session.keystoreCsk,//barsigner.csk
dbFound = session.keystoreDb,//barsigner.db
bbidFound = session.keystoreBBID,
keysPassword = session.storepass && typeof session.storepass === "string",
commandLinebuildId = session.buildId && typeof session.buildId === "string",//--buildId
buildId = widgetConfig.buildId && typeof widgetConfig.buildId === "string",//Finalized Build ID
@@ -43,6 +43,7 @@ _self = {
AUTHOR_P12 = "author.p12",
BARSIGNER_CSK = "barsigner.csk",
BARSIGNER_DB = "barsigner.db",
BARSIGNER_BBID = "bbidtoken.csk",

//Logging function
signingFileWarn = function (file) {
@@ -56,19 +57,21 @@ _self = {
if (keysPassword || commandLinebuildId) {
if (!keysFound) {
signingFileError(AUTHOR_P12);
} else if (!cskFound) {
signingFileError(BARSIGNER_CSK);
} else if (!dbFound) {
} else if (!cskFound && !bbidFound) {
//Only warn about BBID since the old tokens are deprecated
signingFileError(BARSIGNER_BBID);
} else if (cskFound && !dbFound) {
signingFileError(BARSIGNER_DB);
}

//If a buildId exists in config, but no keys were found, throw a warning
} else if (buildId) {
if (!keysFound) {
signingFileWarn(AUTHOR_P12);
} else if (!cskFound) {
signingFileWarn(BARSIGNER_CSK);
} else if (!dbFound) {
} else if (!cskFound && !bbidFound) {
//Only warn about BBID since the old tokens are deprecated
signingFileWarn(BARSIGNER_BBID);
} else if (cskFound && !dbFound) {
signingFileWarn(BARSIGNER_DB);
}
}
@@ -19,7 +19,7 @@ var path = require("path"),
wrench = require("wrench"),
utils = require("./utils"),
logger = require("./logger"),
signingHelper = require("./signing-helper"),
signingUtils = require("./signing-utils"),
barConf = require("./bar-conf"),
localize = require("./localize"),
params;
@@ -103,17 +103,18 @@ module.exports = {
"archiveName": archiveName,
"barPath": outputDir + "/%s/" + archiveName + ".bar",
"debug": !!cmdline.debug,
"keystore": signingHelper.getKeyStorePath(),
"keystoreCsk": signingHelper.getCskPath(),
"keystoreDb": signingHelper.getDbPath(),
"keystore": signingUtils.getKeyStorePath(),
"keystoreCsk": signingUtils.getCskPath(),
"keystoreDb": signingUtils.getDbPath(),
"keystoreBBID": signingUtils.getKeyStorePathBBID(),
"storepass": signingPassword,
"buildId": buildId,
"appdesc" : appdesc,
getParams: function (toolName) {
return getParams(cmdline, toolName);
},
isSigningRequired: function (config) {
return signingHelper.getKeyStorePath() && signingPassword;
return signingUtils.getKeyStorePath() && signingPassword;
},
"targets": ["simulator", "device"]
};
@@ -22,7 +22,6 @@ var path = require('path'),
conf = require("./conf"),
pkgrUtils = require("./packager-utils"),
logger = require("./logger"),
signingUtils = require("./signing-utils.js"),
_self;

function execSigner(session, target, callback) {
@@ -54,19 +53,6 @@ function execSigner(session, target, callback) {
}

_self = {
getKeyStorePath : function () {
// Todo: decide where to put sigtool.p12 which is genereated and used in WebWorks SDK for Tablet OS
return signingUtils.getKeyStorePath();
},

getCskPath : function () {
return signingUtils.getCskPath();
},

getDbPath : function () {
return signingUtils.getDbPath();
},

execSigner: execSigner
};

0 comments on commit 0924d91

Please sign in to comment.