allow to auto-set cn from gn and sn