diff options
author | Martin Willi <martin@revosec.ch> | 2010-07-13 11:28:04 +0200 |
---|---|---|
committer | Martin Willi <martin@revosec.ch> | 2010-07-13 11:29:35 +0200 |
commit | da9724e6d0fe82db4191a2d15919b365f0f210b0 (patch) | |
tree | 1c36b8e3771a0ba0faa4ef8c80df93b43b9a87b5 /src/pki/commands | |
parent | 24d327ab4dd1dde77572b23794e958684d363a40 (diff) | |
download | strongswan-da9724e6d0fe82db4191a2d15919b365f0f210b0.tar.bz2 strongswan-da9724e6d0fe82db4191a2d15919b365f0f210b0.tar.xz |
Renamed key_encod{ing,der}_t and constants, prepare for generic credential encoding
Diffstat (limited to 'src/pki/commands')
-rw-r--r-- | src/pki/commands/gen.c | 2 | ||||
-rw-r--r-- | src/pki/commands/keyid.c | 12 | ||||
-rw-r--r-- | src/pki/commands/print.c | 4 | ||||
-rw-r--r-- | src/pki/commands/pub.c | 2 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/pki/commands/gen.c b/src/pki/commands/gen.c index b2769da54..0a6571153 100644 --- a/src/pki/commands/gen.c +++ b/src/pki/commands/gen.c @@ -20,7 +20,7 @@ */ static int gen() { - key_encoding_type_t form = KEY_PRIV_ASN1_DER; + cred_encoding_type_t form = PRIVKEY_ASN1_DER; key_type_t type = KEY_RSA; u_int size = 0; private_key_t *key; diff --git a/src/pki/commands/keyid.c b/src/pki/commands/keyid.c index c15c1193e..6d2f7b915 100644 --- a/src/pki/commands/keyid.c +++ b/src/pki/commands/keyid.c @@ -99,11 +99,11 @@ static int keyid() if (type == CRED_PRIVATE_KEY) { private = cred; - if (private->get_fingerprint(private, KEY_ID_PUBKEY_SHA1, &id)) + if (private->get_fingerprint(private, KEYID_PUBKEY_SHA1, &id)) { printf("subjectKeyIdentifier: %#B\n", &id); } - if (private->get_fingerprint(private, KEY_ID_PUBKEY_INFO_SHA1, &id)) + if (private->get_fingerprint(private, KEYID_PUBKEY_INFO_SHA1, &id)) { printf("subjectPublicKeyInfo hash: %#B\n", &id); } @@ -112,11 +112,11 @@ static int keyid() else if (type == CRED_PUBLIC_KEY) { public = cred; - if (public->get_fingerprint(public, KEY_ID_PUBKEY_SHA1, &id)) + if (public->get_fingerprint(public, KEYID_PUBKEY_SHA1, &id)) { printf("subjectKeyIdentifier: %#B\n", &id); } - if (public->get_fingerprint(public, KEY_ID_PUBKEY_INFO_SHA1, &id)) + if (public->get_fingerprint(public, KEYID_PUBKEY_INFO_SHA1, &id)) { printf("subjectPublicKeyInfo hash: %#B\n", &id); } @@ -131,11 +131,11 @@ static int keyid() fprintf(stderr, "extracting public key from certificate failed"); return 1; } - if (public->get_fingerprint(public, KEY_ID_PUBKEY_SHA1, &id)) + if (public->get_fingerprint(public, KEYID_PUBKEY_SHA1, &id)) { printf("subjectKeyIdentifier: %#B\n", &id); } - if (public->get_fingerprint(public, KEY_ID_PUBKEY_INFO_SHA1, &id)) + if (public->get_fingerprint(public, KEYID_PUBKEY_INFO_SHA1, &id)) { printf("subjectPublicKeyInfo hash: %#B\n", &id); } diff --git a/src/pki/commands/print.c b/src/pki/commands/print.c index a86a9236d..6d5462783 100644 --- a/src/pki/commands/print.c +++ b/src/pki/commands/print.c @@ -30,11 +30,11 @@ static void print_pubkey(public_key_t *key) printf("pubkey: %N %d bits\n", key_type_names, key->get_type(key), key->get_keysize(key) * 8); - if (key->get_fingerprint(key, KEY_ID_PUBKEY_INFO_SHA1, &chunk)) + if (key->get_fingerprint(key, KEYID_PUBKEY_INFO_SHA1, &chunk)) { printf("keyid: %#B\n", &chunk); } - if (key->get_fingerprint(key, KEY_ID_PUBKEY_SHA1, &chunk)) + if (key->get_fingerprint(key, KEYID_PUBKEY_SHA1, &chunk)) { printf("subjkey: %#B\n", &chunk); } diff --git a/src/pki/commands/pub.c b/src/pki/commands/pub.c index de0444c1a..68831362b 100644 --- a/src/pki/commands/pub.c +++ b/src/pki/commands/pub.c @@ -23,7 +23,7 @@ */ static int pub() { - key_encoding_type_t form = KEY_PUB_SPKI_ASN1_DER; + cred_encoding_type_t form = PUBKEY_SPKI_ASN1_DER; credential_type_t type = CRED_PRIVATE_KEY; int subtype = KEY_RSA; certificate_t *cert; |