This is a strangely preliminary step toward swearing, especially for people who have already sworn (at least by their estimation.) Swearing, being a verbal act, consenting being the same. It’s like promising to promise, agreeing to agree, assenting to assent. But maybe Hamlet has a more serious oath in mind, the kind with blood and bindings, maybe an ancient ritual thrown in? Maybe he means the kind of swearings that tend to stick because they had a stinging stick at the start, the pain of which you’ll remember later if you think about breaking it.