Skip to content

Instantly share code, notes, and snippets.

@syzdek
Last active November 27, 2019 04:46
Show Gist options
  • Save syzdek/bf8cfb0be41b7b0ae4588a0e46dcc71b to your computer and use it in GitHub Desktop.
Save syzdek/bf8cfb0be41b7b0ae4588a0e46dcc71b to your computer and use it in GitHub Desktop.
Example output of example.oidspec from ldap-utils
//
// Generated on: 2019-11-26 19:42:02
// Generated with: ./src/oidspectool
// --source
// ../src/utils/oidspectool/example.oidspec
//
#define _LDAPSCHEMA_OIDSPECS 1
#include <stdio.h>
// "1.3.6.1.1.15.8"
// ../src/utils/oidspectool/example.oidspec:56
const struct ldapschema_spec ldapschema_oidspecs0 =
{
.oid = "1.3.6.1.1.15.8",
.name = "AlgorithmIdentifier",
.desc = "X.509 Algorithm Identifier",
.flags = LDAPSCHEMA_O_READABLE,
.type = LDAPSCHEMA_SYNTAX,
.subtype = LDAPSCHEMA_CLASS_ASCII,
.def = "( 1.3.6.1.1.15.7 DESC 'X.509 Algorithm Identifier' )",
.abnf = "AlgorithmIdentifier = \"{\" sp ai-algorithm\n"
" [ \",\" sp ai-parameters ] sp \"}\"\n"
"\n"
"ai-algorithm = id-algorithm msp OBJECT-IDENTIFIER\n"
"ai-parameters = id-parameters msp Value\n"
"id-algorithm = %x61.6C.67.6F.72.69.74.68.6D ; 'algorithm'\n"
"id-parameters = %x70.61.72.61.6D.65.74.65.72.73 ; 'parameters'\n",
.re_posix = NULL,
.re_pcre = NULL,
.spec = "RFC 4523: LDAP X.509 Schema",
.spec_type = LDAPSCHEMA_SPEC_RFC,
.spec_name = "4523",
.spec_section = "2.11",
.spec_source = NULL,
.spec_vendor = "IETF",
.spec_text = NULL,
.notes = NULL,
.examples = NULL,
};
// "1.3.6.1.4.1.1466.115.121.1.22"
// ../src/utils/oidspectool/example.oidspec:136
const struct ldapschema_spec ldapschema_oidspecs1 =
{
.oid = "1.3.6.1.4.1.1466.115.121.1.22",
.name = "FacsimileTelephoneNumber",
.desc = "Facsimile Telephone Number",
.flags = LDAPSCHEMA_O_READABLE| LDAPSCHEMA_O_COMMON_ABNF,
.type = LDAPSCHEMA_SYNTAX,
.subtype = LDAPSCHEMA_CLASS_ASCII,
.def = "( 2.5.4.23 NAME 'facsimileTelephoneNumber' SYNTAX 1.3.6.1.4.1.1466.115.121.1.22 )",
.abnf = "fax-number = telephone-number\n"
" *( DOLLAR fax-parameter )\n"
"telephone-number = PrintableString\n"
"fax-parameter = \"twoDimensional\" /\n"
" \"fineResolution\" /\n"
" \"unlimitedLength\" /\n"
" \"b4Length\" /\n"
" \"a3Width\" /\n"
" \"b4Width\" /\n"
" \"uncompressed\"\n",
.re_posix = "("
"(^\\+[[:digit:]] [[:digit:]]{3,3} [[:digit:]]{3,3} [[:digit:]]{4,4})|"
"(^\\+[[:digit:]]-[[:digit:]]{3,3}-[[:digit:]]{3,3}-[[:digit:]]{4,4})|"
"(^\\+[[:digit:]]{2,2} [[:digit:]] [[:digit:]]{4,4} [[:digit:]]{4,4})"
")(\\$"
"(twoDimensional)|"
"(fineResolution)|"
"(unlimitedLength)|"
"(b4Length)|"
"(a3Width)|"
"(b4Width)|"
"(uncompressed)"
"){0,}$",
.re_pcre = NULL,
.spec = "RFC 4517: Lightweight Directory Access Protocol (LDAP): Syntaxes and Matching Rules",
.spec_type = LDAPSCHEMA_SPEC_RFC,
.spec_name = "4517",
.spec_section = "3.3.11",
.spec_source = "https://tools.ietf.org/rfc/rfc4517.txt",
.spec_vendor = "IETF",
.spec_text = NULL,
.notes = NULL,
.examples = (const char *[])
{
"+61 3 9896 7801",
"+81 3 347 7418$fineResolution",
NULL,
},
};
const size_t ldapschema_oidspecs_len = 2;
const struct ldapschema_spec * ldapschema_oidspecs[] =
{
&ldapschema_oidspecs0, // "1.3.6.1.1.15.8"
&ldapschema_oidspecs1, // "1.3.6.1.4.1.1466.115.121.1.22"
NULL
};
/* end of source */
//
// Generated on: 2019-11-26 19:44:51
// Generated with: ./src/oidspectool
// --header
// ../src/utils/oidspectool/example.oidspec
//
#ifndef _LDAPSCHEMA_OIDSPECS_H
#define _LDAPSCHEMA_OIDSPECS_H 1
#include <stdio.h>
extern const struct ldapschema_spec ldapschema_oidspecs0;
extern const struct ldapschema_spec ldapschema_oidspecs1;
extern const size_t ldapschema_oidspecs_len;
extern const struct ldapschema_spec * ldapschema_oidspecs[];
#endif /* end of header */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment