qcow2.c (d46a0bb24d6061c1eadcf1136fa73dc7c4ac267d) qcow2.c (8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7)
1/*
2 * Block driver for the QCOW version 2 format
3 *
4 * Copyright (c) 2004-2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

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

963 error_setg(errp, "AES cipher not available");
964 ret = -EINVAL;
965 goto fail;
966 }
967 s->crypt_method_header = header.crypt_method;
968 if (s->crypt_method_header) {
969 if (bdrv_uses_whitelist() &&
970 s->crypt_method_header == QCOW_CRYPT_AES) {
1/*
2 * Block driver for the QCOW version 2 format
3 *
4 * Copyright (c) 2004-2006 Fabrice Bellard
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a copy
7 * of this software and associated documentation files (the "Software"), to deal
8 * in the Software without restriction, including without limitation the rights

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

963 error_setg(errp, "AES cipher not available");
964 ret = -EINVAL;
965 goto fail;
966 }
967 s->crypt_method_header = header.crypt_method;
968 if (s->crypt_method_header) {
969 if (bdrv_uses_whitelist() &&
970 s->crypt_method_header == QCOW_CRYPT_AES) {
971 error_report("qcow2 built-in AES encryption is deprecated");
972 error_printf("Support for it will be removed in a future release.\n"
973 "You can use 'qemu-img convert' to switch to an\n"
974 "unencrypted qcow2 image, or a LUKS raw image.\n");
971 error_setg(errp,
972 "Use of AES-CBC encrypted qcow2 images is no longer "
973 "supported in system emulators");
974 error_append_hint(errp,
975 "You can use 'qemu-img convert' to convert your "
976 "image to an alternative supported format, such "
977 "as unencrypted qcow2, or raw with the LUKS "
978 "format instead.\n");
979 ret = -ENOSYS;
980 goto fail;
975 }
976
977 bs->encrypted = 1;
978
979 /* Encryption works on a sector granularity */
980 bs->request_alignment = BDRV_SECTOR_SIZE;
981 }
982

--- 2433 unchanged lines hidden ---
981 }
982
983 bs->encrypted = 1;
984
985 /* Encryption works on a sector granularity */
986 bs->request_alignment = BDRV_SECTOR_SIZE;
987 }
988

--- 2433 unchanged lines hidden ---