Skip to main content
Participant
March 31, 2009
Answered

CERT_SUBJECT

  • March 31, 2009
  • 3 replies
  • 580 views
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?
This topic has been closed for replies.
Correct answer Newsgroup_User
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

3 replies

Participant
March 31, 2009
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.
Participant
March 31, 2009
Great!
Thanks alot Mack, but just before I mark this as the answer, how do I filter out the "SERIALNUMBER" ?
Newsgroup_UserCorrect answer
Inspiring
March 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