You gave up your 5th ammendment. You fucked yourself. He probably would have found it anyway with a K-9 but you incriminated yourself. The cop can search anything if you tell him you have something.