For the CPP part of your question: During your marriage, both you and your spouse were making separate contributions to CPP. These are referred to as “credits”, and are recorded by the Canadian government. If either of you request it, you can trigger what becomes a mandatory process called “credit splitting”, where the accumulated credits are divided up between you. You don’t need to go to court to get the process started, and once one of you has triggered it, you generally can’t agree not to prevent it from happening. Once the credit split is achieved, it will affect both of your future CPP benefits accordingly. The government of Canada has a useful webpage that describes this concept, and the process:
RRSP are treated a little differently. They are essentially an investment of money; they accordingly have a cash value that can be divided up by the court in line with the usual rules around untangling your finances as part of the divorce. How an RRSP may or may not get divided, will all depend on the circumstances of your relationship. It’s best to talk to an experienced Family Law lawyer to familiarize yourself with your rights.