I am not sure which version of Firmware library you are using.
Use version V3.1.0 with old version there was already some problem in CANInit code. Just make sure you have right prescaler and other setting for right baud rate and also add speed 50Mhz for both CAN Tx and Rx pins. (GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz)