Added support of EdDSA signatures
This commit is contained in:
committed by
Tobias Brunner
parent
564a199674
commit
35bc60cc68
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Copyright (C) 2014-2015 Andreas Steffen
|
||||
* Copyright (C) 2014-2016 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -44,6 +44,10 @@ static int gen()
|
||||
{
|
||||
type = KEY_ECDSA;
|
||||
}
|
||||
else if (streq(arg, "ed25519"))
|
||||
{
|
||||
type = KEY_ED25519;
|
||||
}
|
||||
else if (streq(arg, "bliss"))
|
||||
{
|
||||
type = KEY_BLISS;
|
||||
@@ -101,6 +105,9 @@ static int gen()
|
||||
case KEY_ECDSA:
|
||||
size = 384;
|
||||
break;
|
||||
case KEY_ED25519:
|
||||
size = 256;
|
||||
break;
|
||||
case KEY_BLISS:
|
||||
size = 1;
|
||||
break;
|
||||
@@ -159,7 +166,7 @@ static void __attribute__ ((constructor))reg()
|
||||
{
|
||||
command_register((command_t) {
|
||||
gen, 'g', "gen", "generate a new private key",
|
||||
{" [--type rsa|ecdsa|bliss] [--size bits] [--safe-primes]",
|
||||
{" [--type rsa|ecdsa|ed25519|bliss] [--size bits] [--safe-primes]",
|
||||
"[--shares n] [--threshold l] [--outform der|pem]"},
|
||||
{
|
||||
{"help", 'h', 0, "show usage information"},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* Copyright (C) 2015-2016 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -112,6 +112,11 @@ static int issue()
|
||||
type = CRED_PRIVATE_KEY;
|
||||
subtype = KEY_ECDSA;
|
||||
}
|
||||
else if (streq(arg, "ed25519"))
|
||||
{
|
||||
type = CRED_PRIVATE_KEY;
|
||||
subtype = KEY_ED25519;
|
||||
}
|
||||
else if (streq(arg, "bliss"))
|
||||
{
|
||||
type = CRED_PRIVATE_KEY;
|
||||
@@ -585,7 +590,7 @@ static void __attribute__ ((constructor))reg()
|
||||
command_register((command_t) {
|
||||
issue, 'i', "issue",
|
||||
"issue a certificate using a CA certificate and key",
|
||||
{"[--in file] [--type pub|pkcs10|priv|rsa|ecdsa|bliss] --cakey file|--cakeyid hex",
|
||||
{"[--in file] [--type pub|pkcs10|priv|rsa|ecdsa|ed25519|bliss] --cakey file|--cakeyid hex",
|
||||
" --cacert file [--dn subject-dn] [--san subjectAltName]+",
|
||||
"[--lifetime days] [--serial hex] [--ca] [--pathlen len]",
|
||||
"[--flag serverAuth|clientAuth|crlSign|ocspSigning|msSmartcardLogon]+",
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* Copyright (C) 2010 Martin Willi
|
||||
* Copyright (C) 2010 revosec AG
|
||||
*
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* Copyright (C) 2015-2016 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -106,6 +106,12 @@ static int print()
|
||||
type = CRED_PRIVATE_KEY;
|
||||
subtype = KEY_ECDSA;
|
||||
}
|
||||
else if (streq(arg, "ed25519") ||
|
||||
streq(arg, "ed25519-priv"))
|
||||
{
|
||||
type = CRED_PRIVATE_KEY;
|
||||
subtype = KEY_ED25519;
|
||||
}
|
||||
else if (streq(arg, "bliss") ||
|
||||
streq(arg, "bliss-priv"))
|
||||
{
|
||||
@@ -181,7 +187,7 @@ static void __attribute__ ((constructor))reg()
|
||||
command_register((command_t)
|
||||
{ print, 'a', "print",
|
||||
"print a credential in a human readable form",
|
||||
{"[--in file] [--type x509|crl|ac|pub|priv|rsa|ecdsa|bliss]"},
|
||||
{"[--in file] [--type x509|crl|ac|pub|priv|rsa|ecdsa|ed25519|bliss]"},
|
||||
{
|
||||
{"help", 'h', 0, "show usage information"},
|
||||
{"in", 'i', 1, "input file, default: stdin"},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (C) 2009 Martin Willi
|
||||
* Copyright (C) 2015 Andreas Steffen
|
||||
* Copyright (C) 2015-2016 Andreas Steffen
|
||||
* HSR Hochschule fuer Technik Rapperswil
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
@@ -90,6 +90,10 @@ static int self()
|
||||
{
|
||||
type = KEY_ECDSA;
|
||||
}
|
||||
else if (streq(arg, "ed25519"))
|
||||
{
|
||||
type = KEY_ED25519;
|
||||
}
|
||||
else if (streq(arg, "bliss"))
|
||||
{
|
||||
type = KEY_BLISS;
|
||||
@@ -421,7 +425,7 @@ static void __attribute__ ((constructor))reg()
|
||||
command_register((command_t) {
|
||||
self, 's', "self",
|
||||
"create a self signed certificate",
|
||||
{" [--in file|--keyid hex] [--type rsa|ecdsa|bliss|priv]",
|
||||
{" [--in file|--keyid hex] [--type rsa|ecdsa|ed25519|bliss|priv]",
|
||||
" --dn distinguished-name [--san subjectAltName]+",
|
||||
"[--lifetime days] [--serial hex] [--ca] [--ocsp uri]+",
|
||||
"[--flag serverAuth|clientAuth|crlSign|ocspSigning|msSmartcardLogon]+",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "PKI \-\-GEN" 1 "2013-07-31" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.TH "PKI \-\-GEN" 1 "2016-12-13" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.
|
||||
.SH "NAME"
|
||||
.
|
||||
@@ -45,7 +45,8 @@ Set debug level, default: 1.
|
||||
Read command line options from \fIfile\fR.
|
||||
.TP
|
||||
.BI "\-t, \-\-type " type
|
||||
Type of key to generate. Either \fIrsa\fR or \fIecdsa\fR, defaults to \fIrsa\fR.
|
||||
Type of key to generate. Either \fIrsa\fR, \fIecdsa\fR, \fIed25519\fR or
|
||||
\fIbliss\fR, defaults to \fIrsa\fR.
|
||||
.TP
|
||||
.BI "\-s, \-\-size " bits
|
||||
Key length in bits. Defaults to 2048 for \fIrsa\fR and 384 for \fIecdsa\fR.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "PKI \-\-ISSUE" 1 "2013-08-12" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.TH "PKI \-\-ISSUE" 1 "2016-12-13" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.
|
||||
.SH "NAME"
|
||||
.
|
||||
@@ -68,9 +68,9 @@ key/request is read from \fISTDIN\fR.
|
||||
.TP
|
||||
.BI "\-t, \-\-type " type
|
||||
Type of the input. One of \fIpub\fR (public key), \fIpriv\fR (private key),
|
||||
\fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA private key), \fIbliss\fR (BLISS
|
||||
private key) or \fIpkcs10\fR (PKCS#10 certificate request), defaults to
|
||||
\fIpub\fR.
|
||||
\fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA private key),
|
||||
\fIed25519\fR (Ed25519 private key) \fIbliss\fR (BLISS private key) or
|
||||
\fIpkcs10\fR (PKCS#10 certificate request), defaults to \fIpub\fR.
|
||||
.TP
|
||||
.BI "\-k, \-\-cakey " file
|
||||
CA private key file. Either this or
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "PKI \-\-PRINT" 1 "2013-07-31" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.TH "PKI \-\-PRINT" 1 "2016-12-13" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.
|
||||
.SH "NAME"
|
||||
.
|
||||
@@ -47,8 +47,8 @@ Input file. If not given the input is read from \fISTDIN\fR.
|
||||
Type of input. One of \fIx509\fR (X.509 certificate), \fIcrl\fR (Certificate
|
||||
Revocation List, CRL), \fIac\fR (Attribute Certificate), \fIpub\fR (public key),
|
||||
\fpriv\fR (private key), \fIrsa\fR (RSA private key), \fIecdsa\fR (ECDSA private
|
||||
key), \fIbliss\fR (BLISS private key), \fIpriv\fR (private key), defaults to
|
||||
\fIx509\fR.
|
||||
key), \fIed25519\fR (Ed25519 private key), \fIbliss\fR (BLISS private key),
|
||||
\fIpriv\fR (private key), defaults to \fIx509\fR.
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
.TH "PKI \-\-SELF" 1 "2013-07-31" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.TH "PKI \-\-SELF" 1 "2016-12-13" "@PACKAGE_VERSION@" "strongSwan"
|
||||
.
|
||||
.SH "NAME"
|
||||
.
|
||||
@@ -68,8 +68,8 @@ Private key input file. If not given the key is read from \fISTDIN\fR.
|
||||
Key ID of a private key on a smartcard.
|
||||
.TP
|
||||
.BI "\-t, \-\-type " type
|
||||
Type of the input key. Either \fIpriv\fR, \fIrsa\fR, \fIecdsa\fR or \fIbliss\fR,
|
||||
defaults to \fIpriv\fR.
|
||||
Type of the input key. Either \fIpriv\fR, \fIrsa\fR, \fIecdsa\fR, \fIed25519\fR
|
||||
or \fIbliss\fR, defaults to \fIpriv\fR.
|
||||
.TP
|
||||
.BI "\-d, \-\-dn " distinguished-name
|
||||
Subject and issuer distinguished name (DN). Required.
|
||||
|
||||
Reference in New Issue
Block a user