I have an x509 certificate's subject distinguished name (DN) from an X.509 certificate. I want to extract common name (CN) from it. Is there a way to do it via crypto/x509
or any other library in Go?
For Example, if the subject's distinguished name is:
CN=AMA AMI SA APB MDE MADB MDS LE.AXVD-04954-19-17.,OU=Abc,O=DA.CB.AcbDinema.com,dnQualifier=PY0aT8abfcQeUyquTe4w5RVasfY=
then I want to extract common name (CN) part (AMA AMI SA APB MDE MADB MDS LE.AXVD-04954-19-17.
) out of it.