Development discussion of WireGuard
 help / color / mirror / Atom feed
From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
To: "Jason A. Donenfeld" <Jason@zx2c4.com>,
	WireGuard mailing list <wireguard@lists.zx2c4.com>
Subject: curve25519_generate.js [was: Re: [ANNOUNCE] WireGuard Snapshot `0.0.20171211` Available]
Date: Mon, 11 Dec 2017 14:26:21 -0500	[thread overview]
Message-ID: <874loxxe02.fsf@fifthhorseman.net> (raw)
In-Reply-To: <b95c15baca1d3929@frisell.zx2c4.com>

[-- Attachment #1: Type: text/plain, Size: 2158 bytes --]

Hi Jason, all--

On Mon 2017-12-11 01:32:53 +0100, Jason A. Donenfeld wrote:
> A new snapshot, `0.0.20171211`, has been tagged in the git repository.

thanks for this!

>   * contrib: keygen-html for generating keys in the browser

This includes:

  contrib/examples/keygen-html/curve25519_generate.js

which appears to be a generated file -- looks like it would normally be
built from:

  contrib/examples/keygen-html/src/curve25519_generate.c

based on this comment in the headers of the .c file:

     Build with emcc -O3 --memory-init-file 0 -o curve25519_generate.js curve25519_generate.c

A few questions about this situation, as it doesn't align with the rest
of the source:

 * is there a reason to include a generated file in the revision
   control?  This seems similar to introducing a compiled copy of
   /usr/bin/wg to the source code, which doesn't seem like a great plan.

 * Is there a reason not to use a Makefile in this example directory, as
   a standard way of indicating how to do the build?

 * The conversion to the SPDX header of the .js file seems to be done
   manually.  if the generated .js file will stay in this example, will
   the SPDX header be re-created after any change to the .c source?

 * Do you expect packagers do rebuild this with whatever version of
   emscripten available to them?  Or should that be left up to the party
   who makes use of the key-generator?

   In debian, i can't reasonably ship a binary artifact that i can't
   build from source (this is sensible debian policy, and one of the
   things that keeps debian a free software operating system).  Alas, in
   debian emscripten seems to be having maintenance difficulties:

      https://tracker.debian.org/pkg/emscripten

   so it'll take me longer to package and release this snapshot if want
   to include the keygen-html example with the compiled binary.


I think the simplest thing for now is to drop the .js from the example
source, add a Makefile, and shift the burden of compilation/emscripten
onto the administrator who decides to deploy keygen.html.

I welcome any other suggestions or different perspectiveson the
situation.

  --dkg


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-12-11 19:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11  0:32 [ANNOUNCE] WireGuard Snapshot `0.0.20171211` Available Jason A. Donenfeld
2017-12-11 19:26 ` Daniel Kahn Gillmor [this message]
2017-12-11 20:15   ` curve25519_generate.js [was: Re: [ANNOUNCE] WireGuard Snapshot `0.0.20171211` Available] Jason A. Donenfeld
2017-12-11 21:28     ` Daniel Kahn Gillmor
2017-12-12  0:18       ` Jason A. Donenfeld
2017-12-12  0:20         ` Jason A. Donenfeld
2017-12-12  0:43         ` Daniel Kahn Gillmor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874loxxe02.fsf@fifthhorseman.net \
    --to=dkg@fifthhorseman.net \
    --cc=Jason@zx2c4.com \
    --cc=wireguard@lists.zx2c4.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).