Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 610334
Collapse All | Expand All

(-)file_not_specified_in_diff (-6 / +6 lines)
Line  Link Here
0
-- python-crypto-2.6.1.orig/src/block_template.c
0
++ python-crypto-2.6.1/src/block_template.c
Lines 172-185 ALGnew(PyObject *self, PyObject *args, P Link Here
172
	}
172
	}
173
	if (IVlen != 0 && mode == MODE_ECB)
173
	if (IVlen != 0 && mode == MODE_ECB)
174
	{
174
	{
175
		PyErr_Format(PyExc_ValueError, "ECB mode does not use IV");
175
		PyErr_WarnEx(PyExc_FutureWarning, "ECB mode does not use IV", 1);
176
		return NULL;
176
		IVlen = 0;
177
	}
177
	}
178
	if (IVlen != 0 && mode == MODE_CTR)
178
	if (IVlen != 0 && mode == MODE_CTR)
179
	{
179
	{
180
		PyErr_Format(PyExc_ValueError,
180
		PyErr_WarnEx(PyExc_FutureWarning,
181
			"CTR mode needs counter parameter, not IV");
181
			"CTR mode needs counter parameter, not IV", 1);
182
		return NULL;
182
		IVlen = 0;
183
	}
183
	}
184
	if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR)
184
	if (IVlen != BLOCK_SIZE && mode != MODE_ECB && mode != MODE_CTR)
185
	{
185
	{

Return to bug 610334