Canada has passed legislation to unlock offshore renewable energy in Nova Scotia and Newfoundland and Labrador.