Jesse Glick commented on Bug JENKINS-17677

Using /script in 1.506:

text = new java.io.File('…/updates/default.json').text;
json = net.sf.json.JSONObject.fromObject(text);
sig = json.remove('signature');
sha1 = java.security.MessageDigest.getInstance("SHA1");
baos = new ByteArrayOutputStream();
w = new OutputStreamWriter(baos, "UTF-8");
json.writeCanonical(w);
w.close();
sha1.update(baos.toByteArray())
computedDigest = hudson.remoting.Base64.encode(sha1.digest());
providedDigest = sig.optString("correct_digest");
println('computed: ' + computedDigest);
println('provided: ' + providedDigest);

computed: A76w9trilqKAm1tpJ+SXC/VOu48=
provided: A76w9trilqKAm1tpJ+SXC/VOu48=

And in 1.505:

computed: WxtpFxOUSOkkuCHxUidvdFExQWA=
provided: A76w9trilqKAm1tpJ+SXC/VOu48=

So this does indeed look like a json-lib incompatibility.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply via email to