diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2016-09-10 16:53:23 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2016-09-10 16:53:23 +0000 |
commit | d35db1ffc3439522881da84ae65b47e29c57d2e9 (patch) | |
tree | 432ac5334d938530148443fbf4b26f78b10aa548 /sys/arch | |
parent | cfefb69aaaa865bbee77272f5a62148e8e90439b (diff) |
Clean up some softraid crypto code - rename struct sr_crypto_kdf_pbkdf2 to
sr_crypto_pbkdf (since it is useable for more than just pkcs5_pbkdf2) and
embed a struct sr_crypto_genkdf within it, rather than redeclaring the same
fields. Rename SR_CRYPTOKDFT_PBKDF2 to SR_CRYPTOKDFT_PCKS5_PBKDF2 and add
SR_CRYPTOKDFT_BCRYPT_PBKDF for upcoming changes.
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/amd64/stand/libsa/softraid.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/stand/libsa/softraid.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/stand/ofwboot/softraid.c | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/sys/arch/amd64/stand/libsa/softraid.c b/sys/arch/amd64/stand/libsa/softraid.c index 88299a3432c..2db07b31290 100644 --- a/sys/arch/amd64/stand/libsa/softraid.c +++ b/sys/arch/amd64/stand/libsa/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.26 2016/09/10 16:38:16 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.27 2016/09/10 16:53:22 jsing Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> @@ -659,7 +659,7 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv) struct sr_meta_crypto *cm; struct sr_boot_keydisk *kd; struct sr_meta_opt_item *omi; - struct sr_crypto_kdf_pbkdf2 *kdfhint; + struct sr_crypto_pbkdf *kdfhint; struct sr_crypto_kdfinfo kdfinfo; char passphrase[PASSPHRASE_LENGTH]; u_int8_t digest[SHA1_DIGEST_LENGTH]; @@ -679,7 +679,7 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv) } cm = (struct sr_meta_crypto *)omi->omi_som; - kdfhint = (struct sr_crypto_kdf_pbkdf2 *)&cm->scm_kdfhint; + kdfhint = (struct sr_crypto_pbkdf *)&cm->scm_kdfhint; switch (cm->scm_mask_alg) { case SR_CRYPTOM_AES_ECB_256: diff --git a/sys/arch/i386/stand/libsa/softraid.c b/sys/arch/i386/stand/libsa/softraid.c index 06bbc554509..6a28fe8ab71 100644 --- a/sys/arch/i386/stand/libsa/softraid.c +++ b/sys/arch/i386/stand/libsa/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.17 2016/09/10 16:38:16 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.18 2016/09/10 16:53:22 jsing Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> @@ -516,7 +516,7 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv) struct sr_meta_crypto *cm; struct sr_boot_keydisk *kd; struct sr_meta_opt_item *omi; - struct sr_crypto_kdf_pbkdf2 *kdfhint; + struct sr_crypto_pbkdf *kdfhint; struct sr_crypto_kdfinfo kdfinfo; char passphrase[PASSPHRASE_LENGTH]; u_int8_t digest[SHA1_DIGEST_LENGTH]; @@ -536,7 +536,7 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv) } cm = (struct sr_meta_crypto *)omi->omi_som; - kdfhint = (struct sr_crypto_kdf_pbkdf2 *)&cm->scm_kdfhint; + kdfhint = (struct sr_crypto_pbkdf *)&cm->scm_kdfhint; switch (cm->scm_mask_alg) { case SR_CRYPTOM_AES_ECB_256: diff --git a/sys/arch/sparc64/stand/ofwboot/softraid.c b/sys/arch/sparc64/stand/ofwboot/softraid.c index b42236a29ef..9cb09c19b89 100644 --- a/sys/arch/sparc64/stand/ofwboot/softraid.c +++ b/sys/arch/sparc64/stand/ofwboot/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.5 2016/09/10 16:38:16 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.6 2016/09/10 16:53:22 jsing Exp $ */ /* * Copyright (c) 2012 Joel Sing <jsing@openbsd.org> @@ -529,7 +529,7 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv) struct sr_meta_crypto *cm; struct sr_boot_keydisk *kd; struct sr_meta_opt_item *omi; - struct sr_crypto_kdf_pbkdf2 *kdfhint; + struct sr_crypto_pbkdf *kdfhint; struct sr_crypto_kdfinfo kdfinfo; char passphrase[PASSPHRASE_LENGTH]; u_int8_t digest[SHA1_DIGEST_LENGTH]; @@ -549,7 +549,7 @@ sr_crypto_decrypt_keys(struct sr_boot_volume *bv) } cm = (struct sr_meta_crypto *)omi->omi_som; - kdfhint = (struct sr_crypto_kdf_pbkdf2 *)&cm->scm_kdfhint; + kdfhint = (struct sr_crypto_pbkdf *)&cm->scm_kdfhint; switch (cm->scm_mask_alg) { case SR_CRYPTOM_AES_ECB_256: |