From 7df52bd052398a199fbeb9f0f858b2c44fe1799f Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Thu, 11 Dec 2014 01:49:22 +0000 Subject: [PATCH] Correct the x509 patch to insert the note before signing (not after). --- roles/mediawiki/files/fedmsg-emit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roles/mediawiki/files/fedmsg-emit.php b/roles/mediawiki/files/fedmsg-emit.php index e8f3d2d518..9582e5ec76 100644 --- a/roles/mediawiki/files/fedmsg-emit.php +++ b/roles/mediawiki/files/fedmsg-emit.php @@ -119,6 +119,9 @@ $wgHooks['UploadComplete'][] = 'upload_complete'; function sign_message($message_obj) { global $config; + # Stuff a little note in there about how we're signing this + $message_obj['crypto'] = 'x509'; + # This is required so that the string we sign is identical in python and in # php. Ordereddict is used there; ksort here. deep_ksort($message_obj); @@ -160,7 +163,6 @@ function sign_message($message_obj) { # Step 3) - Stuff it back in the message and return $message_obj['signature'] = $signature; $message_obj['certificate'] = $cert; - $message_obj['crypto'] = 'x509'; return $message_obj; }