Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Private/Public key generation for local builds #104

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,33 @@ Gradle will pull dependencies over the clearnet by default. To use Tor, create a
systemProp.socksProxyPort=9150
```

### Signing key and configuration

As part of the build step there will be a package signing step through which the ZIP archive gets converted to a SU3 package. For this you'll need to setup the signing keys.

Private key generation:

```
keytool -genkeypair -dname "[email protected], ou=I2P, o=Anonymous, c=EU" -keyalg rsa -keysize 4096 -alias [email protected] -keypass password -keystore ~/keystore.ks -storepass changeit -validity 180
```

* the only important values to keep as show are keyalg, keysize, storepass (because 'changeit' is the default somewhere in net.i2p.crypto.SU3File class. Class used for the zip to su3 conversion).
* CN value and the alias should be the same email address

Public keys export:

```
keytool -list -rfc -keystore ~/keystore.ks -alias [email protected] -storepass changeit > ~/yourname_at_mail.i2p.crt
```
The filename at the end is important if you also want to deploy the plugin you have built on your own router. The file should be your email address with @ replaced with \_at\_ and you'll need to copy it to the ~/.i2p/certificates/plugin folder (which you'll also need to create as it doesn't exist by default)

Updates for `webapp/build.gradle` (under i2p -> plugin section):

* change author and signer values to your alias, [email protected] was used in the examples
* new entry for privKeyStore "/absolute/path/to/keystore.ks"
* new entry for pubKeyStore "/absolute/path/to/yourname\_at\_mail.i2p.crt"


### Building the I2P plugin

```
Expand Down