# code signing

**URL:** <https://forum.servoy.com/t/code-signing/17620>\
**Category:** Classic Servoy\
**Created:** [November 11, 2013, 2:14pm UTC](https://forum.servoy.com/t/code-signing/17620 "2013-11-11T14:14:02Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jos\_devoon.nl](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jos\_devoon.nl](https://forum.servoy.com/u/jos_devoon.nl)\
**Post date:** [November 11, 2013, 2:14pm UTC](https://forum.servoy.com/t/code-signing/17620/1 "2013-11-11T14:14:02Z")

</div>

Because in java 7 all code must be properly signed with a valid certificate, we followed these steps:

[https://wiki.servoy.com/display/tutoria … ertificate](https://wiki.servoy.com/display/tutorials/Creating+a+keystore+with+a+self+signed+certificate)  
[https://wiki.servoy.com/display/tutoria … +Authority](https://wiki.servoy.com/display/tutorials/Authorize+a+self+signed+certificate+by+a+trusted+3rd+party+Certificate+Authority)  
[https://wiki.servoy.com/display/tutorials/JAR+signing](https://wiki.servoy.com/display/tutorials/JAR+signing)

We got a free (test) certificate from the [http://www.instantssl.com](http://www.instantssl.com) website and we got succesfully our crt file back vald for 90 days. Imported the crt file into our ks file succesfully (including the ‘parents’). Then we used the ks file to sign all the jars in de application folder. Cleared the de java cache, restarted the Servoy applicationserver. When starting a smartclient this message comes up:  
sun.security.validator.ValidatorException: Extended key usage does not permit use for code signing  
at sun.security.validator.EndEntityChecker.checkCodeSigning(Unknown Source)  
at sun.security.validator.EndEntityChecker.check(Unknown Source)  
at sun.security.validator.Validator.validate(Unknown Source)  
at sun.security.validator.Validator.validate(Unknown Source)  
at sun.security.validator.Validator.validate(Unknown Source)  
at com.sun.deploy.security.TrustDecider.getValidationState(Unknown Source)  
at com.sun.deploy.security.TrustDecider.validateChain(Unknown Source)  
at com.sun.deploy.security.TrustDecider.isAllPermissionGranted(Unknown Source)  
at com.sun.javaws.security.AppPolicy.grantUnrestrictedAccess(Unknown Source)  
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResourcesHelper(Unknown Source)  
at com.sun.javaws.security.JNLPSignedResourcesHelper.checkSignedResources(Unknown Source)  
at com.sun.javaws.Launcher.prepareResources(Unknown Source)  
at com.sun.javaws.Launcher.prepareAllResources(Unknown Source)  
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)  
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source)  
at com.sun.javaws.Launcher.launch(Unknown Source)  
at com.sun.javaws.Main.launchApp(Unknown Source)  
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)  
at com.sun.javaws.Main.access$000(Unknown Source)  
at com.sun.javaws.Main$1.run(Unknown Source)  
at java.lang.Thread.run(Unknown Source)

Are we doing something wrong?

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [November 11, 2013, 4:43pm UTC](https://forum.servoy.com/t/code-signing/17620/2 "2013-11-11T16:43:22Z")

</div>

Sounds like the certificate is not a code signing certificate, but “just” a SSL certificate. You need a code signing certificate.

---

<div class="post-metadata">

**Author:** ![jos\_devoon.nl](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jos\_devoon.nl](https://forum.servoy.com/u/jos_devoon.nl)\
**Post date:** [November 12, 2013, 7:08am UTC](https://forum.servoy.com/t/code-signing/17620/3 "2013-11-12T07:08:50Z")

</div>

> Sounds like the certificate is not a code signing certificate, but “just” a SSL certificate. You need a code signing certificate.

So the Servoy documentation on this is wrong?

See: [https://wiki.servoy.com/display/tutorials/JAR+signing](https://wiki.servoy.com/display/tutorials/JAR+signing)

---

<div class="post-metadata">

**Author:** ![ROCLASI](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/roclasi/32/4371_2.png) [@ROCLASI](https://forum.servoy.com/u/ROCLASI)\
**Post date:** [November 12, 2013, 10:40am UTC](https://forum.servoy.com/t/code-signing/17620/4 "2013-11-12T10:40:08Z")

</div>

Hi Jos,

I guess you are referring to the page linked in that page ([https://wiki.servoy.com/display/tutoria … +Authority](https://wiki.servoy.com/display/tutorials/Authorize+a+self+signed+certificate+by+a+trusted+3rd+party+Certificate+Authority)).  
And indeed that talks about an SSL certificate. That page is correct when you want to use an SSL connection on your Servoy server but not for when you want to resign your jars. At least the reference to an SSL certificate is wrong in this context.

---

<div class="post-metadata">

**Author:** ![jos\_devoon.nl](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jos\_devoon.nl](https://forum.servoy.com/u/jos_devoon.nl)\
**Post date:** [November 12, 2013, 10:55am UTC](https://forum.servoy.com/t/code-signing/17620/5 "2013-11-12T10:55:20Z")

</div>

I’m indeed referring to the links on that page. May be someone can improve those explanations…? It is confusing for the non Java and/or non certificate experts ![:)]( "Smile")  
Since it gets mandatory to sign all the jars officially and properly in the near future…  
Thanks!

---

<div class="post-metadata">

**Author:** ![jos\_devoon.nl](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jos\_devoon.nl](https://forum.servoy.com/u/jos_devoon.nl)\
**Post date:** [December 4, 2013, 8:07am UTC](https://forum.servoy.com/t/code-signing/17620/6 "2013-12-04T08:07:25Z")

</div>

We purchased indeed a codesigning certificate from Thawte (it took them 1.5 week to check us out (-: instead of the mentioned 2 or 3 working days) but the process itself is not very difficult. In the end you can pick-up a bunch of codelines that have to be copy-pasted into a file that can be imported in the original .ks file. Basicly I followed all the steps again in the above explanations. Now our software is properly signed with one trusted signature (don’t forget de codebase flag: -Dcodebase=\* in the actual signtester command. The \* means it can be anything… ).  
Except for the yellow box about the Permissions attribute in the jnlp file, but I understood this is going to dissappear by itself when the next update (Servoy? Java?) is released.
