qcow.c (6ed5546fa7bf12c5b87ef76bafb86e1d77ed6e85) qcow.c (8c0dcbc4ad2bf4f9f3b27c637b357e87cad70ec7)
1/*
2 * Block driver for the QCOW 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

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

157 error_setg(errp, "AES cipher not available");
158 ret = -EINVAL;
159 goto fail;
160 }
161 s->crypt_method_header = header.crypt_method;
162 if (s->crypt_method_header) {
163 if (bdrv_uses_whitelist() &&
164 s->crypt_method_header == QCOW_CRYPT_AES) {
1/*
2 * Block driver for the QCOW 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

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

157 error_setg(errp, "AES cipher not available");
158 ret = -EINVAL;
159 goto fail;
160 }
161 s->crypt_method_header = header.crypt_method;
162 if (s->crypt_method_header) {
163 if (bdrv_uses_whitelist() &&
164 s->crypt_method_header == QCOW_CRYPT_AES) {
165 error_report("qcow built-in AES encryption is deprecated");
166 error_printf("Support for it will be removed in a future release.\n"
167 "You can use 'qemu-img convert' to switch to an\n"
168 "unencrypted qcow image, or a LUKS raw image.\n");
165 error_setg(errp,
166 "Use of AES-CBC encrypted qcow images is no longer "
167 "supported in system emulators");
168 error_append_hint(errp,
169 "You can use 'qemu-img convert' to convert your "
170 "image to an alternative supported format, such "
171 "as unencrypted qcow, or raw with the LUKS "
172 "format instead.\n");
173 ret = -ENOSYS;
174 goto fail;
169 }
170
171 bs->encrypted = 1;
172 }
173 s->cluster_bits = header.cluster_bits;
174 s->cluster_size = 1 << s->cluster_bits;
175 s->cluster_sectors = 1 << (s->cluster_bits - 9);
176 s->l2_bits = header.l2_bits;

--- 875 unchanged lines hidden ---
175 }
176
177 bs->encrypted = 1;
178 }
179 s->cluster_bits = header.cluster_bits;
180 s->cluster_size = 1 << s->cluster_bits;
181 s->cluster_sectors = 1 << (s->cluster_bits - 9);
182 s->l2_bits = header.l2_bits;

--- 875 unchanged lines hidden ---