/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to debian/mandos-client.postinst

  • Committer: Teddy Hogeborn
  • Date: 2015-07-09 20:32:52 UTC
  • Revision ID: teddy@recompile.se-20150709203252-u10p7trfsxc1a9yp
Install client Diffie-Hellman parameters into initramfs.

* debian/control (Package: mandos-client/Recommends): Added
  "gnutls-bin | openssl" (to generate DH parameters).
* debian/mandos-client.postinst (create_dh_params): New function
                                                    called on package
                                                    configure.
* plugins.d/mandos-client.c (main): Bug fix: Work around Debian bug
                                    #633582 also for the
                                    "client-dhparams.pem" file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
}
65
65
 
66
66
create_dh_params(){
67
 
    if [ -r /etc/keys/mandos/dhparams.pem ]; then
 
67
    if [ -r /etc/keys/mandos/client-dhparams.pem ]; then
68
68
        return 0
69
69
    fi
70
70
    # Create a Diffe-Hellman parameters file
84
84
        "$DHFILE"
85
85
    sed --in-place --expression='1i-----BEGIN DH PARAMETERS-----' \
86
86
            "$DHFILE"
87
 
    cp --archive "$DHFILE" /etc/keys/mandos/dhparams.pem
 
87
    cp --archive "$DHFILE" /etc/keys/mandos/client-dhparams.pem
88
88
    rm -- "$DHFILE"
89
89
}
90
90