Generally, a uncoerced admission to officers isn't immediately illegal, but its use in a trial is a complicated matter. The key factor is whether it was obtained legally. Officers must adhere to specific procedures, https://panchanandshaw.com/blog/contempt-notice-explained/