Skip to content

Conversation

@StephenWall
Copy link
Contributor

Add a function to lookup and return an OID, short name, and long name, given a string containing any one of those, for all OIDs known to OpenSSL.

Examples:

php > var_export(openssl_oid_lookup("CN"));
array (
  'oid' => '2.5.4.3',
  'lname' => 'commonName',
  'sname' => 'CN',
)
php > var_export(openssl_oid_lookup("unstructuredName"));
array (
  'oid' => '1.2.840.113549.1.9.2',
  'lname' => 'unstructuredName',
)
php > var_export(openssl_oid_lookup("1.2.3.4.5"));
array (
  'oid' => '1.2.3.4.5',
)
php > var_export(openssl_oid_lookup("junk"));
false

Create a function to lookup and return an OID, short name, and long name, given a string containing any one of those, for all OIDs known to OpenSSL.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant