Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/eli/g_eli.c
Show First 20 Lines • Show All 954 Lines • ▼ Show 20 Lines | g_eli_create(struct gctl_req *req, struct g_class *mp, struct g_provider *bpp, | ||||
pp->mediasize = sc->sc_mediasize; | pp->mediasize = sc->sc_mediasize; | ||||
pp->sectorsize = sc->sc_sectorsize; | pp->sectorsize = sc->sc_sectorsize; | ||||
g_error_provider(pp, 0); | g_error_provider(pp, 0); | ||||
G_ELI_DEBUG(0, "Device %s created.", pp->name); | G_ELI_DEBUG(0, "Device %s created.", pp->name); | ||||
G_ELI_DEBUG(0, "Encryption: %s %u", g_eli_algo2str(sc->sc_ealgo), | G_ELI_DEBUG(0, "Encryption: %s %u", g_eli_algo2str(sc->sc_ealgo), | ||||
sc->sc_ekeylen); | sc->sc_ekeylen); | ||||
if (sc->sc_flags & G_ELI_FLAG_AUTH) | switch (sc->sc_ealgo) { | ||||
case CRYPTO_3DES_CBC: | |||||
gone_in(13, | |||||
"support for GEOM_ELI volumes encrypted with 3des"); | |||||
break; | |||||
case CRYPTO_BLF_CBC: | |||||
gone_in(13, | |||||
"support for GEOM_ELI volumes encrypted with blowfish"); | |||||
break; | |||||
} | |||||
if (sc->sc_flags & G_ELI_FLAG_AUTH) { | |||||
G_ELI_DEBUG(0, " Integrity: %s", g_eli_algo2str(sc->sc_aalgo)); | G_ELI_DEBUG(0, " Integrity: %s", g_eli_algo2str(sc->sc_aalgo)); | ||||
switch (sc->sc_aalgo) { | |||||
case CRYPTO_MD5_HMAC: | |||||
gone_in(13, | |||||
"support for GEOM_ELI volumes authenticated with hmac/md5"); | |||||
break; | |||||
} | |||||
} | |||||
G_ELI_DEBUG(0, " Crypto: %s", | G_ELI_DEBUG(0, " Crypto: %s", | ||||
sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware"); | sc->sc_crypto == G_ELI_CRYPTO_SW ? "software" : "hardware"); | ||||
return (gp); | return (gp); | ||||
failed: | failed: | ||||
mtx_lock(&sc->sc_queue_mtx); | mtx_lock(&sc->sc_queue_mtx); | ||||
sc->sc_flags |= G_ELI_FLAG_DESTROY; | sc->sc_flags |= G_ELI_FLAG_DESTROY; | ||||
wakeup(sc); | wakeup(sc); | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 452 Lines • Show Last 20 Lines |