IBM Support

Maximo Anywhere - Are your Windows builds failing because of expired certificates?

Technical Blog Post


Abstract

Maximo Anywhere - Are your Windows builds failing because of expired certificates?

Body

I was running through a Maximo Anywhere 7.6 install the other day and I got to the point of building my Windows tablet applications when the build started to fail.  I had done nothing different then previous runs in the past, however now this time I'm receiving a message saying my certificate has expired! But what certificate is expired?

 

When using the Windows Maximo Anywhere applications we create certificates that are copied to the device and installed as trusted which allow us to sign the applications and install Maximo Anywhere on our Windows Tablets.  However that is not the only time the certificates are used, the build process also uses them to sign the .appx files when initiated. So if the certificates expire, not only will you not be able to install the applications to Windows tablet, but you won't be able to build new Windows applications either.

 

First off, you might be asking why are you receiving these errors now?  To answer that, with the install of Maximo Anywhere 7.5.2.1 and 7.6 which both support Windows Tablets a temporary certificate was provided which can be used to sign the applications.  You will see this certificate in each of the applications native directories, for example under \IBM\Anywhere\MaximoAnywhere\apps\WorkExecution\windows8\native you would see a certificate file called MaximoAnywhere_TemporaryKey which is used to sign the applications during the build process. This is as it says a temporary key, although provided and can be used, the idea was that the client generate their own certificates to sign the applications with.   If this was not done, the certificate that was bundled has now expired and when building will produce an error similar to the following.

 

[exec]   C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\AppxPa
ckage\Microsoft.AppXPackage.Targets(2519,5): error APPX0108: The certificate specified has expired. For more information about renewing certificates, see http:/
/go.microsoft.com/fwlink/?LinkID=241478. [C:\IBM\Anywhere\MaximoAnywhere\apps\As
setAudit\windows8\native\AssetAudit.jsproj]
     [exec]
     [exec]     4 Warning(s)
     [exec]     1 Error(s)
     [exec]
     [exec] Time Elapsed 00:00:18.46

 

Now that we know why this error is occurring, how do we fix it? 

 

Under each application's native folder there is java script project file, which can be opened in Visual Studio as seen below.

 

image

Once you have opened this file with your Visual Studio Tools, you will see a file called package.appxmanifest in your solution explorer pane.  You will want to select this, which will open the file in the main view.

 

image

Now what we need to do is click on the packaging tab, this will display the current certificate defined, which in this case is the expired certificate.  To define a new valid certificate click on the choose certificate button and point to the certificate you wish to build\install the apps with.  This will then create a .pfx certificate for the application you modified in the \windows8\native folder which is valid and named for the application it was installed to.  You will want to also install this cert as a trusted certificate on the build machine as well.

 

image

 

If you don't have a certificate to sign the applications with, in the above panel after you click on 'Choose Certificate' you will have the option to create another  temporary certificate that expires one year from it's creation which can be used as the out of the box certificate was.  If you do this, you may want to copy the certificate out to a central location as you will want to import it for the other applications and use it with the above procedure for each of the Maximo Anywhere applications with expired certificates.  If you continue to get expired certificate errors after this, you can try and re-name your certificate to match the previously expired one (MaximoAnywhere_TemporaryKey) and attempt the build again.

 

I hope this document was informative and assists with your Anywhere Implementations, remember as the previous bundled certificates are expired all new installs will fail with the above error unless your certificates are updated. Any questions, comments or concerns please post below.

 

Update 09/21/2017

 

In Maximo Anywhere 7.6.2 the test certificate saves to  C:\IBM\Anywhere\MaximoAnywhere\apps\WorkExecution\windows8\native\WorkExecution.WindowsPhone8  instead of C:\IBM\Anywhere\MaximoAnywhere\apps\WorkExecution\windows8\native where the solution project file exists.  You will need to copy the certificate it creates back in to the native directory and re-name to MaximoAnywhere_TemporaryKey before building.

 

[{"Business Unit":{"code":"BU005","label":"IoT"}, "Product":{"code":"SSLKT6","label":"Maximo Asset Management"},"Component":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"","Edition":""}]

UID

ibm11129587