fix up key names

This commit is contained in:
Jeff Becker 2016-10-10 08:03:33 -04:00
parent bb9dda6ba9
commit 7c1914a466
No known key found for this signature in database
GPG key ID: AB950234D6EA286B
2 changed files with 16 additions and 15 deletions

View file

@ -22,17 +22,21 @@ Make an destination key with a certain key type
./keygen privkey.dat <number> ./keygen privkey.dat <number>
or
| key type | number | ./keygen privkey.dat <key name>
| key name | number |
| -------------------- | ------ | | -------------------- | ------ |
| DSA SHA1 | 0 | | DSA-SHA1 | 0 |
| ECDSA_SHA256_P256 | 1 | | ECDSA-SHA256-P256 | 1 |
| ECDSA_SHA384_P384 | 2 | | ECDSA-SHA384-P384 | 2 |
| ECDSA_SHA512_P521 | 3 | | ECDSA-SHA512-P521 | 3 |
| RSA_SHA256_2048 | 4 | | RSA-SHA256-2048 | 4 |
| RSA_SHA384_3072 | 5 | | RSA-SHA384-3072 | 5 |
| RSA_SHA512_4096 | 6 | | RSA-SHA512-4096 | 6 |
| EDDSA_SHA512_ED25519 | 7 | | EDDSA-SHA512-ED25519 | 7 |

View file

@ -55,14 +55,11 @@ uint16_t NameToSigType(const std::string & keyname)
if(name.find("P384") != npos) return i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA384_P384; if(name.find("P384") != npos) return i2p::data::SIGNING_KEY_TYPE_ECDSA_SHA384_P384;
if(name.find("RSA2048") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048; if(name.find("RSA-SHA265") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048;
if(name.find("RSA-2048") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA256_2048;
if(name.find("RSA3072") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072; if(name.find("RSA-SHA384") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072;
if(name.find("RSA-3072") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA384_3072;
if(name.find("RSA4096") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096; if(name.find("RSA-SHA512") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096;
if(name.find("RSA-4096") != npos) return i2p::data::SIGNING_KEY_TYPE_RSA_SHA512_4096;
if(name.find("ED25519") != npos) return i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519; if(name.find("ED25519") != npos) return i2p::data::SIGNING_KEY_TYPE_EDDSA_SHA512_ED25519;