Deleted Added
full compact
g_eli.c (226840) g_eli.c (228634)
1/*-
2 * Copyright (c) 2005-2011 Pawel Jakub Dawidek <pawel@dawidek.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2005-2011 Pawel Jakub Dawidek <pawel@dawidek.net>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/geom/eli/g_eli.c 226840 2011-10-27 16:12:25Z pjd $");
28__FBSDID("$FreeBSD: head/sys/geom/eli/g_eli.c 228634 2011-12-17 15:26:34Z avg $");
29
30#include <sys/param.h>
31#include <sys/systm.h>
29
30#include <sys/param.h>
31#include <sys/systm.h>
32#include <sys/cons.h>
32#include <sys/kernel.h>
33#include <sys/linker.h>
34#include <sys/module.h>
35#include <sys/lock.h>
36#include <sys/mutex.h>
37#include <sys/bio.h>
38#include <sys/sbuf.h>
39#include <sys/sysctl.h>

--- 1040 unchanged lines hidden (view full) ---

1080 "Found no key files in loader.conf for %s.",
1081 pp->name);
1082 return (NULL);
1083 }
1084
1085 /* Ask for the passphrase if defined. */
1086 if (md.md_iterations >= 0) {
1087 printf("Enter passphrase for %s: ", pp->name);
33#include <sys/kernel.h>
34#include <sys/linker.h>
35#include <sys/module.h>
36#include <sys/lock.h>
37#include <sys/mutex.h>
38#include <sys/bio.h>
39#include <sys/sbuf.h>
40#include <sys/sysctl.h>

--- 1040 unchanged lines hidden (view full) ---

1081 "Found no key files in loader.conf for %s.",
1082 pp->name);
1083 return (NULL);
1084 }
1085
1086 /* Ask for the passphrase if defined. */
1087 if (md.md_iterations >= 0) {
1088 printf("Enter passphrase for %s: ", pp->name);
1088 gets(passphrase, sizeof(passphrase),
1089 cngets(passphrase, sizeof(passphrase),
1089 g_eli_visible_passphrase);
1090 }
1091
1092 /*
1093 * Prepare Derived-Key from the user passphrase.
1094 */
1095 if (md.md_iterations == 0) {
1096 g_eli_crypto_hmac_update(&ctx, md.md_salt,

--- 185 unchanged lines hidden ---
1090 g_eli_visible_passphrase);
1091 }
1092
1093 /*
1094 * Prepare Derived-Key from the user passphrase.
1095 */
1096 if (md.md_iterations == 0) {
1097 g_eli_crypto_hmac_update(&ctx, md.md_salt,

--- 185 unchanged lines hidden ---