g_eli.c (9a696dc6bb0e8e783dfd169c8299e1f33aac2935) g_eli.c (5c420aae3b18027809507dc9142182d4290897bf)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2005-2019 Pawel Jakub Dawidek <pawel@dawidek.net>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

955 pp->mediasize = sc->sc_mediasize;
956 pp->sectorsize = sc->sc_sectorsize;
957
958 g_error_provider(pp, 0);
959
960 G_ELI_DEBUG(0, "Device %s created.", pp->name);
961 G_ELI_DEBUG(0, "Encryption: %s %u", g_eli_algo2str(sc->sc_ealgo),
962 sc->sc_ekeylen);
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2005-2019 Pawel Jakub Dawidek <pawel@dawidek.net>
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

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

955 pp->mediasize = sc->sc_mediasize;
956 pp->sectorsize = sc->sc_sectorsize;
957
958 g_error_provider(pp, 0);
959
960 G_ELI_DEBUG(0, "Device %s created.", pp->name);
961 G_ELI_DEBUG(0, "Encryption: %s %u", g_eli_algo2str(sc->sc_ealgo),
962 sc->sc_ekeylen);
963 if (sc->sc_flags & G_ELI_FLAG_AUTH)
963 switch (sc->sc_ealgo) {
964 case CRYPTO_3DES_CBC:
965 gone_in(13,
966 "support for GEOM_ELI volumes encrypted with 3des");
967 break;
968 case CRYPTO_BLF_CBC:
969 gone_in(13,
970 "support for GEOM_ELI volumes encrypted with blowfish");
971 break;
972 }
973 if (sc->sc_flags & G_ELI_FLAG_AUTH) {
964 G_ELI_DEBUG(0, " Integrity: %s", g_eli_algo2str(sc->sc_aalgo));
974 G_ELI_DEBUG(0, " Integrity: %s", g_eli_algo2str(sc->sc_aalgo));
975 switch (sc->sc_aalgo) {
976 case CRYPTO_MD5_HMAC:
977 gone_in(13,
978 "support for GEOM_ELI volumes authenticated with hmac/md5");
979 break;
980 }
981 }
965 G_ELI_DEBUG(0, " Crypto: %s",
966 sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware");
967 return (gp);
968failed:
969 mtx_lock(&sc->sc_queue_mtx);
970 sc->sc_flags |= G_ELI_FLAG_DESTROY;
971 wakeup(sc);
972 /*

--- 452 unchanged lines hidden ---
982 G_ELI_DEBUG(0, " Crypto: %s",
983 sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware");
984 return (gp);
985failed:
986 mtx_lock(&sc->sc_queue_mtx);
987 sc->sc_flags |= G_ELI_FLAG_DESTROY;
988 wakeup(sc);
989 /*

--- 452 unchanged lines hidden ---