• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CERT_SUBJECT

New Here ,
Mar 31, 2009 Mar 31, 2009

Copy link to clipboard

Copied

I have a certificate and if I run this:
#CERT_SUBJECT#

I get this:
C=IS, OU=einkaskilriki, OU=Auðkenning, OU=1, SERIALNUMBER=2501673779, CN=Sveinbjörn Grétarsson

How can I just display the CN value?
TOPICS
Advanced techniques

Views

452

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

LEGEND , Mar 31, 2009 Mar 31, 2009
Sveinbjorn G wrote:
> I have a certificate and if I run this:
> #CERT_SUBJECT#
>=20
> I get this:
> C=3DIS, OU=3Deinkaskilriki, OU=3DAu=F0kenning, OU=3D1, SERIALNUMBER=3D=
2501673779,=20
> CN=3DSveinbj=F6rn Gr=E9tarsson
>=20
> How can I just display the CN value?

ListLast(ListLast(CERT_SUBJECT, ","), "=3D")

--=20
Mack

Votes

Translate

Translate
LEGEND ,
Mar 31, 2009 Mar 31, 2009

Copy link to clipboard

Copied

Sveinbjorn G wrote:
> I have a certificate and if I run this:
> #CERT_SUBJECT#
>=20
> I get this:
> C=3DIS, OU=3Deinkaskilriki, OU=3DAu=F0kenning, OU=3D1, SERIALNUMBER=3D=
2501673779,=20
> CN=3DSveinbj=F6rn Gr=E9tarsson
>=20
> How can I just display the CN value?

ListLast(ListLast(CERT_SUBJECT, ","), "=3D")

--=20
Mack

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 31, 2009 Mar 31, 2009

Copy link to clipboard

Copied

Great!
Thanks alot Mack, but just before I mark this as the answer, how do I filter out the "SERIALNUMBER" ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 31, 2009 Mar 31, 2009

Copy link to clipboard

Copied

LATEST
Ok, I found out my self:
#ListLast(listGetAt(CERT_SUBJECT, 5), "=")#

There was some extra characters in Mack's answer.

But anyhow, thanks alot Mack.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation