"answer and swear"

Where does this sense of the word 'swear' come from, as opposed to taking an oath?