[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [ease-dev] [EASE] Sign and Verify Script
|
Hi,
My task of 23 May - 3 June is
to create scripts with valid/invalid signatures for testing purposes and
method to extract signature from script.
I have
prepared a sample script with signature which is attached here. The
signature is created using a code that I have written using java
security library and
is here on Github. GetSigExistKeys.java contains methods for signing script. GenSigExistKeys.java shows how to use these methods.
As
I mentioned in a previous post, we can attach certificate with
signature and script. Since certificate and signature are in binary
format, they are converted to Base64 format and then attached to script.
At the end of script, format is like this:
- signature starts with /********BEGIN SIGNATURE********
- first line is the signature
- next set of lines is certificate in binary format
- signing part ends with ********END SIGNATURE********/
Simple method to extract certificate from script is here on Github.
If this format of signature is proper, I will create more scripts with valid/invalid signature.
Thanks,
Hi,
We have used Decorators in
Project Explorer to tell user the status of that script: whether its
signature is valid or invalid. I have attached a screenshot of same
below. Here, for example, .java file is having broken(invalid)
certificate decorator and .js file is having valid decorator.
Plugin is available on Github.We
can control on what file to place which decorator by
decorate() method
of class implementing
ILightWeightLabelDecorator. For the first time
when file is executed, signature will be verified and result will be
stored using
setPersistentProperty() method of
IFile. Then each time, we
can see whether signature is valid or invalid by simply calling
getPersistentProperty().
I was also able to solve the error of saving Preference Pages with help of Jonah Graham.
Updated plugin is on Github and screenshot is attached here.
I
have posted major bugs on BugZilla with a parent bug [1] and other
child bugs are blocking this parent bug. Still several bugs are
remaining to be posted. I will be posting them soon.
I was
also experimenting on how to add Properties Page in Properties menu of
Context Menu. I have simply added two labels whose screenshot is
attached here. Again,
plugin is on Github.I
studied documentations on how to use CertPath classes [2], [3] for
getting certificate chain from Certificate file. From this certificate
chain, one can tell whether it is valid, signed by root i.e. public key
matches that of root, using CertPath class. CertificateFactory class is
used to instantiate a certificate from certificate file or from any
input stream [4].
--
Varun Raval
Attachment:
hello.js
Description: application/javascript