README.md 3.11 KB
Newer Older
Sietse Ringers's avatar
Sietse Ringers committed
1
# irmago   [![GoDoc](https://godoc.org/github.com/privacybydesign/irmago?status.svg)](https://godoc.org/github.com/privacybydesign/irmago) [![Go Report Card](https://goreportcard.com/badge/github.com/privacybydesign/irmago)](https://goreportcard.com/report/github.com/privacybydesign/irmago)
2

Sietse Ringers's avatar
Sietse Ringers committed
3
`irmago` is an IRMA implementation in Go. It contains multiple libraries and applications:
Sietse Ringers's avatar
Sietse Ringers committed
4

Sietse Ringers's avatar
Sietse Ringers committed
5
* The Go package `irma` contains generic IRMA functionality used by all other components below, such as parsing [credential and issuer definitions and public keys](https://github.com/privacybydesign/irma-demo-schememanager), parsing [IRMA metadata attributes](https://credentials.github.io/docs/irma.html#the-metadata-attribute), and structs representing messages of the [IRMA protocol](https://credentials.github.io/protocols/irma-protocol/).
Sietse Ringers's avatar
Sietse Ringers committed
6
7
8
* The Go package [`irmaclient`](tree/master/irmaclient) is a library that serves as the client in the IRMA protocol; it can receive and disclose IRMA attributes and store and read them from storage. It also implements the [keyshare protocol](https://github.com/privacybydesign/irma_keyshare_server) and handles registering to keyshare servers. The [IRMA mobile app](https://github.com/privacybydesign/irma_mobile) uses `irmaclient`.
* The [`server`](tree/master/server) package contains the corresponding IRMA server as a Go library and as an executable.
* The tool [`irma`](tree/master/irma) for generating IRMA issuer public/private keypairs, and for verifying and signing [IRMA schemes](https://credentials.github.io/docs/irma.html#scheme-managers).
9

10
11
## Dependencies

Sietse Ringers's avatar
Sietse Ringers committed
12
`irmago` and its subpackages uses [`dep`](https://github.com/golang/dep) for its dependencies. After [Installing `dep`](https://golang.github.io/dep/docs/installation.html) if necesssary, run
13
14
15
16
17
18

    dep ensure

to download and [`vendor`](https://golang.org/cmd/go/#hdr-Vendor_Directories) the correct version of
each dependency.

19
20
21
22
23
24
## Running the unit tests

For running the unit tests, you need to run [irma_keyshare_server](https://github.com/credentials/irma_keyshare_server) and [irma_api_server](https://github.com/credentials/irma_api_server) locally.

### IRMA Keyshare Server

Sietse Ringers's avatar
Sietse Ringers committed
25
- Copy or symlink the `irma_configuration` folder from `testdata/` to the configuration of the Keyshare server.
26
27
28
29
30
31
32
33
    - Note that a `gradle appRun` won't automatically use the new `irma_configuration` folder if it was already built with an old one. For this, use `gradle clean`.
- Add the keyshare user used in the unit tests to the keyshare database by a command like this:

        mysql -uirma -pirma irma_keyshare < keyshareuser.sql

- Make sure `check_user_enabled` is set to false in the Keyshare server configuration. Other options are already setup correctly in the example configuration.


Sietse Ringers's avatar
Sietse Ringers committed
34
35
### IRMA API Server
- Copy or symlink the `irma_configuration` folder from `testdata/` to the configuration of the IRMA api server.
36
37
38
    - Note that a `gradle appRun` won't automatically use the new `irma_configuration` folder if it was already built with an old one. For this, use `gradle clean`.


Sietse Ringers's avatar
Sietse Ringers committed
39
### Running the tests
40
41
The tests can be run by using:

Sietse Ringers's avatar
Sietse Ringers committed
42
    go test -v ./...
43
44

<!-- vim: set ts=4 sw=4: -->