In the following proof, we use freely the properties of the Jacobi symbol as stated in this question.
Suppose $f = ax^2 + bxy + cy^2$.
There exist integers $p, q$ such that $m = ap^2 + bpq + cq^2$.
Let $d =$ gcd$(p, q)$.
Let $p = dp'$, $q = dq'$.
Then $m = d^2(ap'^2 + bp'q' + cq'^2)$.
Let $n = ap'^2 + bp'q' + cq'^2$.
Since gcd$(p', q') = 1$, $n$ is properly represented by $f$.
Since $\chi([m]) = \chi([d])^2 \chi([n]) = \chi([n])$, we may assume $m$ is properly represented by $f$.
By this question, theres exists an integer $b$ such that $D \equiv b^2$ (mod $4m$).
Case 1 $D \equiv 0$ (mod $4$) and $m \gt 0$
Since $m$ is odd, $\chi([m]) = \left(\frac{D}{m}\right) = \left(\frac{b^2}{m}\right) = \left(\frac{b}{m}\right)^2 = 1$.
Case 2 $D \equiv 0$ (mod $4$) and $m \lt 0$
If $D \lt 0$, $f$ is positive definite by the assumption.
Hence $m \gt 0$ by this question.
This is a contradiction.
Hence $D \gt 0$.
Since $m$ is relatively prime to $D$, $m$ is odd.
Since $D \equiv b^2$ (mod $4m$), $D \equiv b^2$ (mod $-m$).
Hence $\chi([-m]) = \left(\frac{D}{-m}\right) = \left(\frac{b^2}{-m}\right) = \left(\frac{b}{-m}\right)^2 = 1$.
Since $D \gt 0$, $\chi([-1]) = 1$ by this question.
Hence $\chi([m]) = \chi([-1])\chi([-m]) = \chi([-1]) = 1$.
Case 3 $D \equiv 1$ (mod $4$) and $m \gt 0$
If $m$ is odd, $\chi([m]) = \left(\frac{D}{m}\right) = \left(\frac{b^2}{m}\right) = \left(\frac{b}{m}\right)^2 = 1$.
Hence we suppose $m$ is even.
Then we have $m = 2^\alpha n, \alpha \ge 1, n \ge 1$, where $n$ is odd.
Since $D \equiv b^2$ (mod $n$), $\chi([n]) = \left(\frac{D}{n}\right) = \left(\frac{b^2}{n}\right) = \left(\frac{b}{n}\right)^2 = 1$.
Hence $\chi([m]) = \chi([2^\alpha])\chi([n]) = \chi([2^\alpha])$.
If $\alpha$ is even, $\chi([2^\alpha]) = 1$.
Hence $\chi([m]) = 1$.
If $\alpha$ is odd, $\chi([2^\alpha]) = \chi([2])$.
Since $D \equiv b^2$ (mod $4m$), $D \equiv b^2$ (mod $8$).
Hence $D \equiv 1$ (mod $8$)
Hence $\chi([2]) = 1$ by this question.
Hence $\chi([m]) = 1$.
Case 4 $D \equiv 1$ (mod $4$) and $m \lt 0$
If $D \lt 0$, $f$ is positive definite by the assumption.
Hence $m \gt 0$ by this question.
This is a contradiction.
Hence $D \gt 0$.
Suppose $m$ is odd.
Since $D \equiv b^2$ (mod $4m$), $D \equiv b^2$ (mod $-m$).
Hence $\chi([-m]) = \left(\frac{D}{-m}\right) = \left(\frac{b^2}{-m}\right) = \left(\frac{b}{-m}\right)^2 = 1$.
Since $D \gt 0$, $\chi([-1]) = 1$ by this question.
Hence $\chi([m]) = \chi([-1])\chi([-m]) = 1$.
Suppose $m$ is even.
Then we have $m = -2^\alpha n, \alpha \ge 1, n \ge 1$, where $n$ is odd.
Since $D \equiv b^2$ (mod $n$), $\chi([n]) = \left(\frac{D}{n}\right) = \left(\frac{b^2}{n}\right) = \left(\frac{b}{n}\right)^2 = 1$.
Hence $\chi([m]) = \chi([-1])\chi([2^\alpha])\chi([n]) = \chi([-1])\chi([2^\alpha]) = \chi([2^\alpha])$.
If $\alpha$ is even, $\chi([2^\alpha]) = 1$.
Hence $\chi([m]) = 1$.
If $\alpha$ is odd, $\chi([2^\alpha]) = \chi([2])$.
Since $D \equiv b^2$ (mod $4m$), $D \equiv b^2$ (mod $8$).
Hence $D \equiv 1$ (mod $8$)
Hence $\chi([2]) = 1$ by this question.
Hence $\chi([m]) = 1$.
This completes the proof.