# [PATCH] added: openssl_csr_subject()

- Thread: https://externals.io/message/13243
- Original archive: https://news-web.php.net/php.internals/13243
- Started by Greg MacLellan on 2004-10-08T19:43:38+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #13243 — Greg MacLellan — 2004-10-08T19:43:38+00:00

URL: https://externals.io/message/13243#13243

Quick patch to add a function openssl_csr_subject() that allows you to 
see the subject of a CSR. Uses the same CSR handling routines as 
 `openssl_csr_sign()` etc, so it can take a string in PEM format, a file, 
whatever.

Prototype: string openssl_csr_subject(mixed csr)

Sample return value:

string(99) "/C=CA/ST=Ontario/L=Kingston/O=Greg MacLellan/OU=PHP/CN=CSR 
Test/emailAddress=greg@gregmaclellan.com"
