Try to use Public_name if no common name tag specified
* fix #775
* fix #776