Then why was Alain Philippon arrested and charged with a crime?
http://www.canada-usblog.com/2016/08/16/the-waiting-game-we-...
http://www.canada-usblog.com/2016/08/16/the-waiting-game-we-...
I am not saying what the CBSA did was legal (as the case was dropped), but not handing over local passwords is considered "obstruction of the officer's job" by the CBSA (for which he was charged).
So I'm assuming that if they did want to charge you, they could.
And his case wasn't dropped. He plead guilty.