aboutsummaryrefslogtreecommitdiffstats
path: root/src/pki/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/pki/commands')
-rw-r--r--src/pki/commands/gen.c2
-rw-r--r--src/pki/commands/keyid.c12
-rw-r--r--src/pki/commands/print.c4
-rw-r--r--src/pki/commands/pub.c2
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;