Merge pull request #1404 from reaperhulk/backport-dsa-truncate

backport DSA truncation fix to 0.6.x