Commit 71e78dd7 authored by Sang Seok Lim's avatar Sang Seok Lim
Browse files

Component Matching module

See "contrib/slapd-modules/comp_match/README" to understand
what's the purpose of  this patch is and how to use it.
parent 7e454e07
......@@ -1795,9 +1795,11 @@ if test "${enable_modules+set}" = set; then
{ echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
fi
ol_enable_modules="$ol_arg"
WITH_MODULES_ENABLED=yes
 
else
ol_enable_modules="no"
WITH_MODULES_ENABLED=no
fi
# end --enable-modules
ol_enable_multimaster=${ol_enable_multimaster-no}
......@@ -24051,6 +24053,7 @@ EOF
 
fi
 
WITH_MODULES_ENABLED=no
if test "$ol_link_modules" != no ; then
cat >> confdefs.h <<\EOF
#define SLAPD_MODULES 1
......@@ -24058,6 +24061,7 @@ EOF
 
BUILD_SLAPD=yes
SLAPD_MODULES_LDFLAGS="-dlopen self"
WITH_MODULES_ENABLED=yes
fi
 
cat >> confdefs.h <<\EOF
......@@ -24707,6 +24711,7 @@ s%@LIBSRCS@%$LIBSRCS%g
s%@PLAT@%$PLAT%g
s%@WITH_SASL@%$WITH_SASL%g
s%@WITH_TLS@%$WITH_TLS%g
s%@WITH_MODULES_ENABLED@%$WITH_MODULES_ENABLED%g
s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
s%@BUILD_SLAPD@%$BUILD_SLAPD%g
s%@BUILD_SLAPI@%$BUILD_SLAPI%g
......
......@@ -2883,6 +2883,7 @@ AC_SUBST(LIBSRCS)
AC_SUBST(PLAT)
AC_SUBST(WITH_SASL)
AC_SUBST(WITH_TLS)
AC_SUBST(WITH_MODULES_ENABLED)
AC_SUBST(BUILD_LIBS_DYNAMIC)
AC_SUBST(BUILD_SLAPD)
......
# $OpenLDAP$
# This work is part of OpenLDAP Software <http://www.openldap.org/>.
#
# Copyright 2003-2004 The OpenLDAP Foundation.
# Portions Copyright 2004 by IBM Corporation.
# All rights reserved.
# Copyright 2004 Sang Seok Lim, IBM Corp. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted only as authorized by the OpenLDAP
# Public License.
#
# A copy of this license is available in the file LICENSE in the
# top-level directory of the distribution or, alternatively, at
# <http://www.OpenLDAP.org/license.html>.
topbuilddir = ../../../../build
topsrcdir = ../../..
snaccdir = /home/slim/snacc
LIBTOOL=$(topbuilddir)/libtool
OPT=-g -finstrument-functions -DLDAP_COMPONENT
CC=gcc
SNACC_INC=-I$(snaccdir) -I$(snaccdir)/c-lib/inc
LDAP_INC=-I$(topsrcdir)/include -I$(topsrcdir)/servers/slapd -I$(topbuilddir)/include
INCS=$(LDAP_INC) $(SNACC_INC)
SNACC_LIB=$(snaccdir)/c-lib/libcasn1.a
SSL_LIB=-lcrypto
LDAP_LIB=-lldap_r -llber
LIBS=$(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB) /home/slim/local/lib/libfnccheck.a
all: compmatch.la
componentlib.lo: componentlib.c
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
certificate.lo: certificate.c
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
asn_to_syn_mr.lo: asn_to_syn_mr.c
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
init.lo: init.c
$(LIBTOOL) --mode=compile $(CC) $(OPT) $(INCS) -c $?
compmatch.la: componentlib.lo init.lo certificate.lo asn_to_syn_mr.lo
$(LIBTOOL) --mode=link $(CC) $(OPT) $(LIBS) -version-info 0:0:0 \
-rpath /home/slim/ldap/local/libexec/openldap -module -o $@ $? $(LIBS)
clean:
\rm compmatch.la componentlib.lo certificate.lo asn_to_syn_mr.lo\
init.o init.lo componentlib.o certificate.o asn_to_syn_mr.o
install:
cp -r .libs $(topsrcdir)/tests/data/comp_libs
cp compmatch.la $(topsrcdir)/tests/data/comp_libs
Copyright 2004 Sang Seok Lim, IBM . All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted only as authorized by the OpenLDAP
Public License.
A copy of this license is available in the file LICENSE in the
top-level directory of the distribution or, alternatively, at
<http://www.OpenLDAP.org/license.html>.
This directory contains a Component Matching module
and a X.509 Certificate example.
In order to understand Component Matching, see RFC 3687
and http://www.openldap.org/conf/odd-sandiego-2004/Sangseok.pdf
Brief introduction about files in this directory
1) init.c
module_init() and four functions which are dynamically linked into the main slapd codes
comp_convert_attr_to_comp : decode an attribute value into a component tree
comp_convert_assert_to_comp : decode an assertion value into a component tree
using the decoder of the extracted component.
comp_convert_asn_to_ldap : transform ASN.1 type values into a LDAP string.
comp_free_component : free memory allocated by GSER or BER decoders
2) componentlib.c and component.h
GSER and BER decoder library of each ASN.1 type. They
use component representation to store ASN.1 values.
3) certificate.c certificate.h cacert.pem
eSNACC generated BER and GSER decoder routines of the X.509 certificate
specification, or certificate.asn1 in the directory. cacert.pem
is generated by openssl to test this module.
4) asn_to_syn_mr.c asn.h
An mapping table from ASN.1 types to corresponding Syntaxes and
matching rules in slapd. If the validate function of the mapped syntax
exists, it will be called to validate the decoded ASN.1 value.
How to compile and test the module with the certificate example
1) be sure to configure slapd with enable-modules on.
2) install an eSNACC compiler. At least, you should have library and
header files to compile the module.
3) modify Makefile accordingly. then execute make.
you will get compmatch.la and other necessary files in ./libs
4) modify slapd.conf to include the following module command
moduleload <path to>compmatch.la
5) run slapd and perform ldapsearch on the attribute, or componentCertificatea
(preregistered example attribute defined by the certificate)
--component search filter example
"componentCertificate:componentCertificateMatch:=item:{ component
\"tbsCertificate.serialNumber\", rule allComponentsMatch, value 2 }"
You can find more examples in "test031-component-filter", a test script.
How to add a new ASN.1 syntax other than the example
1) download and install an eSNACC compiler supporting Component Matching
in www.openldap.org. Before compiling, be sure to define
a "LDAP_COMPONENT" macro to obtain component
supported version of C library and back-ends of eSNACC. Otherwise compiled
library fails to be linked to module.
2) using eSNACc, compile your ASN.1 specifications and copy the generated c files
to this directory
Ex) $ esnacc -E BER_COMP -E GSER -t -d -f example.asn
For Component Matching, set BOTH BER_COMP and GSER on.
After compiling, you will get example.c and example.h
3) modify example.c accordingly, seeing certificate.c and certificate.asn
as a reference.
- modify parameters of add_OD_entry(...) in init_module_xxx(...) in example.c.
you need a new OID to register this module into slapd.
- add init_module_xxx() into init_module() in init.c
4) modify asn.h and asn_to_syn_mr.c accordingly. add new enum ID.
5) register a new attribute syntax with a new OID in a schema file
6) then goto 3) above.
Current Status
The generated functions such as GSER/BER decoders, extractor
allComponentMatch for a X.509 certificate ASN.1 specification (certificate.asn)
have been tested successfully. But this is currently under development.
before using it, don't forget to check following status of development,
1) Not all ASN.1 types are supported yet.
See componentlib.c to check which ASN.1 types are currently supported
2) Component version of GSER encoders are not supported yet
3) Not all ComponentId of a component reference are supported yet
supported : identifier, from-beginning, count, from-end
not supported : all, select, content
/* Copyright 2004 IBM Corporation
* All rights reserved.
* Redisribution and use in source and binary forms, with or without
* modification, are permitted only as authorizd by the OpenLADP
* Public License.
*/
/* ACKNOWLEDGEMENTS
* This work originally developed by Sang Seok Lim
* 2004/06/18 03:20:00 slim@OpenLDAP.org
*/
#ifndef _H_ASN_MODULE
#define _H_ASN_MODULE
typedef enum { BER, GSER } EncRulesType;
typedef enum { ASN_BASIC, ASN_COMPOSITE } AsnType;
typedef enum AsnTypeId {
BASICTYPE_BOOLEAN,
BASICTYPE_INTEGER,
BASICTYPE_BITSTRING,
BASICTYPE_OCTETSTRING,
BASICTYPE_NULL,
BASICTYPE_OID,
BASICTYPE_REAL,
BASICTYPE_ENUMERATED,
BASICTYPE_NUMERIC_STR,
BASICTYPE_PRINTABLE_STR,
BASICTYPE_UNIVERSAL_STR,
BASICTYPE_IA5_STR,
BASICTYPE_BMP_STR,
BASICTYPE_UTF8_STR,
BASICTYPE_UTCTIME,
BASICTYPE_GENERALIZEDTIME,
BASICTYPE_GRAPHIC_STR,
BASICTYPE_VISIBLE_STR,
BASICTYPE_GENERAL_STR,
BASICTYPE_OBJECTDESCRIPTOR,
BASICTYPE_VIDEOTEX_STR,
BASICTYPE_T61_STR,
BASICTYPE_OCTETCONTAINING,
BASICTYPE_BITCONTAINING,
BASICTYPE_RELATIVE_OID, /* 25 */
BASICTYPE_ANY,
/* Embedded Composite Types*/
COMPOSITE_ASN1_TYPE,
/* A New ASN.1 types including type reference */
RDNSequence,
RelativeDistinguishedName,
TelephoneNumber,
FacsimileTelephoneNumber__telephoneNumber,
DirectoryString,
/* Newly Defined ASN.1 Type, Manually registered */
ASN_COMP_CERTIFICATE,
/* ASN.1 Type End */
ASNTYPE_END
} AsnTypeId;
#endif
#include "asn.h"
#include "component.h"
AsnTypetoMatchingRuleTable directory_component_matching_table = {
"1.2.36.79672281.1.13.7",
{
{ BASICTYPE_BOOLEAN,NULL,"1.3.6.1.4.1.1466.115.121.1.7", NULL },
{ BASICTYPE_INTEGER,NULL ,"1.3.6.1.4.1.1466.115.121.1.27", NULL },
{ BASICTYPE_BITSTRING,NULL ,"1.3.6.1.4.1.1466.115.121.1.6", NULL },
{ BASICTYPE_OCTETSTRING,NULL , "1.3.6.1.4.1.1466.115.121.1.40", NULL },
{ BASICTYPE_NULL,NULL , NULL, NULL },
{ BASICTYPE_OID,NULL ,"1.3.6.1.4.1.1466.115.121.1.38", NULL },
{ BASICTYPE_REAL,NULL , NULL, NULL },
{ BASICTYPE_ENUMERATED,NULL , NULL, NULL },
{ BASICTYPE_NUMERIC_STR, "numericStringMatch", "1.3.6.1.4.1.1466.115.121.1.36", NULL },
{ BASICTYPE_PRINTABLE_STR, "caseIgnoreMatch", "1.3.6.1.4.1.1466.115.121.1.44", NULL },
{ BASICTYPE_UNIVERSAL_STR, "caseIgnoreMatch" , NULL, NULL },
{ BASICTYPE_IA5_STR, "caseIgnoreMatch", "1.3.6.1.4.1.1466.115.121.1.26", NULL },
{ BASICTYPE_BMP_STR, "caseIgnoreMatch" , NULL, NULL },
{ BASICTYPE_UTF8_STR, "caseIgnoreMatch" , NULL, NULL },
{ BASICTYPE_UTCTIME, "uTCTimeMatch" , "1.3.6.1.4.1.1466.115.121.1.53", NULL },
{ BASICTYPE_GENERALIZEDTIME, "generalizedTimeMatch" ,"1.3.6.1.4.1.1466.115.121.1.24", NULL },
{ BASICTYPE_GRAPHIC_STR, "caseIgnoreMatch", NULL, NULL },
{ BASICTYPE_VISIBLE_STR, "caseIgnoreMatch", NULL, NULL },
{ BASICTYPE_GENERAL_STR, "caseIgnoreMatch", NULL, NULL },
{ BASICTYPE_OBJECTDESCRIPTOR, NULL , NULL, NULL },
{ BASICTYPE_VIDEOTEX_STR, "caseIgnoreMatch", NULL, NULL },
{ BASICTYPE_T61_STR, "caseIgnoreMatch", NULL, NULL },
{ BASICTYPE_OCTETCONTAINING, NULL , NULL, NULL },
{ BASICTYPE_BITCONTAINING, NULL , NULL, NULL },
{ BASICTYPE_RELATIVE_OID, NULL, "1.2.36.79672281.1.5.0", NULL },
{ RDNSequence, "distinguishedNameMatch" , NULL, NULL },
{ RelativeDistinguishedName, NULL , NULL, NULL },
{ TelephoneNumber, "telephoneNumberMatch" , "1.3.6.1.4.1.1466.115.121.1.50", NULL },
{ FacsimileTelephoneNumber__telephoneNumber, "telephoneNumberMatch","1.3.6.1.4.1.1466.115.121.1.22", NULL },
{ DirectoryString, "caseIgnoreMatch" ,"1.3.6.1.4.1.1466.115.121.1.15", NULL },
{ ASN_COMP_CERTIFICATE, NULL , "1.2.36.79672281.1.5.2" , NULL },
{ ASNTYPE_END , NULL , NULL, NULL }
},
NULL
};
struct asntype_to_syntax asn_to_syntax_mapping_tbl[] = {
{ BASICTYPE_BOOLEAN,"Boolean","1.3.6.1.4.1.1466.115.121.1.7", NULL },
{ BASICTYPE_INTEGER,"Integer","1.3.6.1.4.1.1466.115.121.1.27", NULL },
{ BASICTYPE_BITSTRING,"Bit String","1.3.6.1.4.1.1466.115.121.1.6", NULL },
{ BASICTYPE_OCTETSTRING,"Octet String", "1.3.6.1.4.1.1466.115.121.1.40", NULL },
{ BASICTYPE_NULL,NULL, NULL, NULL },
{ BASICTYPE_OID,"OID","1.3.6.1.4.1.1466.115.121.1.38", NULL },
{ BASICTYPE_REAL,NULL, NULL, NULL },
{ BASICTYPE_ENUMERATED,"Integer", "1.3.6.1.4.1.1466.115.121.1.27", NULL },
{ BASICTYPE_NUMERIC_STR, "Numeric String", "1.3.6.1.4.1.1466.115.121.1.36", NULL },
{ BASICTYPE_PRINTABLE_STR, "Printable String", "1.3.6.1.4.1.1466.115.121.1.44", NULL },
{ BASICTYPE_UNIVERSAL_STR, NULL , NULL, NULL },
{ BASICTYPE_IA5_STR, "IA5 String", "1.3.6.1.4.1.1466.115.121.1.26", NULL },
{ BASICTYPE_BMP_STR, NULL , NULL, NULL },
{ BASICTYPE_UTF8_STR, "Directory String" , "1.3.6.1.4.1.1466.115.121.1.15", NULL },
{ BASICTYPE_UTCTIME, "UTC Time" , "1.3.6.1.4.1.1466.115.121.1.53", NULL },
{ BASICTYPE_GENERALIZEDTIME, "Generalized Time" ,"1.3.6.1.4.1.1466.115.121.1.24", NULL },
{ BASICTYPE_GRAPHIC_STR, NULL, NULL, NULL },
{ BASICTYPE_VISIBLE_STR, "Directory String", "1.3.6.1.4.1.1466.115.121.1.15", NULL },
{ BASICTYPE_GENERAL_STR, NULL, NULL, NULL },
{ BASICTYPE_OBJECTDESCRIPTOR, "Object Class Description", "1.3.6.1.4.1.1466.115.121.1.37", NULL },
{ BASICTYPE_VIDEOTEX_STR, NULL, NULL, NULL },
{ BASICTYPE_T61_STR, NULL, NULL, NULL },
{ BASICTYPE_OCTETCONTAINING, NULL , NULL, NULL },
{ BASICTYPE_BITCONTAINING, NULL , NULL, NULL },
{ BASICTYPE_RELATIVE_OID, "OID", "1.3.6.1.4.1.1466.115.121.1.38", NULL },
{ BASICTYPE_ANY, NULL, NULL, NULL },
{ RDNSequence, "RDN" , "1.2.36.79672281.1.5.0", NULL },
{ RelativeDistinguishedName, "RDN", "1.2.36.79672281.1.5.0", NULL },
{ TelephoneNumber, "Telephone Number" , "1.3.6.1.4.1.1466.115.121.1.50", NULL },
{ FacsimileTelephoneNumber__telephoneNumber, "Facsimile Telephone Number","1.3.6.1.4.1.1466.115.121.1.22", NULL },
{ DirectoryString, "Directory String" ,"1.3.6.1.4.1.1466.115.121.1.15", NULL },
{ ASN_COMP_CERTIFICATE, "componentCertificate", "1.2.36.79672281.1.5.2" , NULL },
{ ASNTYPE_END , NULL , NULL, NULL }
};
AuthenticationFramework {joint-iso-itu-t ds(5) module(1) authenticationFramework(7) 4} DEFINITIONS ::=
BEGIN
-- based on RFC 3280 and X.509
Certificate ::= SEQUENCE {
tbsCertificate TBSCertificate,
signatureAlgorithm AlgorithmIdentifier,
signature BIT STRING
}
TBSCertificate ::= SEQUENCE {
version [0] Version DEFAULT v1,
serialNumber CertificateSerialNumber,
signature AlgorithmIdentifier,
issuer Name,
validity Validity,
subject Name,
subjectPublicKeyInfo SubjectPublicKeyInfo,
issuerUniqueIdentifier [1] IMPLICIT UniqueIdentifier OPTIONAL,
-- if present, version shall be v2 or v3
subjectUniqueIdentifier [2] IMPLICIT UniqueIdentifier OPTIONAL,
-- if present, version shall be v2 or v3
extensions [3] Extensions OPTIONAL
-- If present, version shall be v3 -- }
Version ::= INTEGER { v1(0), v2(1), v3(2) }
CertificateSerialNumber ::= INTEGER
AlgorithmIdentifier ::= SEQUENCE {
algorithm OBJECT IDENTIFIER,
parameters ANY DEFINED BY algorithm OPTIONAL -- DSA, SHA-1--
}
Name ::= CHOICE {
rdnSequence RDNSequence }
RDNSequence ::= SEQUENCE OF RelativeDistinguishedName
RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
AttributeTypeAndValue ::= SEQUENCE {
type AttributeType,
value ANY DEFINED BY type}
AttributeType ::= OBJECT IDENTIFIER
Validity ::= SEQUENCE {
notBefore Time,
notAfter Time }
UniqueIdentifier ::= BIT STRING
SubjectPublicKeyInfo ::= SEQUENCE {
algorithm AlgorithmIdentifier,
subjectPublicKey BIT STRING }
Time ::= CHOICE {
utcTime UTCTime,
generalizedTime GeneralizedTime }
Extensions ::= SEQUENCE SIZE(1..MAX) OF Extension
Extension ::= SEQUENCE {
extnID OBJECT IDENTIFIER,
-- critical BOOLEAN DEFAULT FALSE,
extnValue OCTET STRING
-- contains a DER encoding of a value of type &ExtnType
-- for the extension object identified by extnId --
}
nullOid OBJECT-TYPE
SYNTAX NULL
ACCESS read-write
STATUS mandatory
::= { 1 2 840 113549 1 1 4 }
nullOid2 OBJECT-TYPE
SYNTAX NULL
ACCESS read-write
STATUS mandatory
::= { 1 2 840 113549 1 1 1 }
printableStringOid OBJECT-TYPE
SYNTAX PrintableString
ACCESS read-write
STATUS mandatory
::= { 2 5 4 6 }
END
This diff is collapsed.
#include "asn-incl.h"
/*
* certificate.h
* "AuthenticationFramework" ASN.1 module encode/decode/extracting/matching/free C src.
* This file was generated by modified eSMACC compiler Sat Oct 23 20:25:08 2004
* The generated files are strongly encouraged to be
* compiled as a module for OpenLDAP Software
*/
#ifndef _certificate_h_
#define _certificate_h_
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#pragma warning( disable : 4101 )
#endif
#include "component.h"
typedef enum AuthenticationFrameworkAnyId
{
nullOid_ANY_ID = 0,
nullOid2_ANY_ID = 1,
printableStringOid_ANY_ID = 2} AuthenticationFrameworkAnyId;
void InitAnyAuthenticationFramework();
#define V1 0
#define V2 1
#define V3 2
typedef ComponentInt ComponentVersion; /* INTEGER { V1 (0), V2 (1), V3 (2) } */
#define MatchingComponentVersion MatchingComponentInt
#define ExtractingComponentVersion ExtractingComponentInt
#define BDecComponentVersion BDecComponentInt
#define GDecComponentVersion GDecComponentInt
#define FreeComponentVersion FreeComponentInt
typedef ComponentInt ComponentCertificateSerialNumber; /* INTEGER */
#define MatchingComponentCertificateSerialNumber MatchingComponentInt
#define ExtractingComponentCertificateSerialNumber ExtractingComponentInt
#define BDecComponentCertificateSerialNumber BDecComponentInt
#define GDecComponentCertificateSerialNumber GDecComponentInt
#define FreeComponentCertificateSerialNumber FreeComponentInt
typedef ComponentOid ComponentAttributeType; /* OBJECT IDENTIFIER */
#define MatchingComponentAttributeType MatchingComponentOid
#define ExtractingComponentAttributeType ExtractingComponentOid
#define BDecComponentAttributeType BDecComponentOid
#define GDecComponentAttributeType GDecComponentOid
#define FreeComponentAttributeType FreeComponentOid
typedef ComponentBits ComponentUniqueIdentifier; /* BIT STRING */
#define MatchingComponentUniqueIdentifier MatchingComponentBits
#define ExtractingComponentUniqueIdentifier ExtractingComponentBits
#define BDecComponentUniqueIdentifier BDecComponentBits
#define GDecComponentUniqueIdentifier GDecComponentBits
#define FreeComponentUniqueIdentifier FreeComponentBits
typedef struct AlgorithmIdentifier /* SEQUENCE */
{
Syntax* syntax;
ComponentDesc* comp_desc;
struct berval identifier;
char id_buf[MAX_IDENTIFIER_LEN];
ComponentOid algorithm; /* OBJECT IDENTIFIER */
ComponentAnyDefinedBy parameters; /* ANY DEFINED BY algorithm OPTIONAL */
} ComponentAlgorithmIdentifier;
int MatchingComponentAlgorithmIdentifier PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
void* ExtractingComponentAlgorithmIdentifier PROTO ((ComponentReference *cr, ComponentAlgorithmIdentifier *comp ));
int BDecComponentAlgorithmIdentifier PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
int GDecComponentAlgorithmIdentifier PROTO ((GenBuf * b, ComponentAlgorithmIdentifier **v, AsnLen *bytesDecoded, int mode));
void FreeComponentAlgorithmIdentifier(ComponentAlgorithmIdentifier *v);
typedef struct Time /* CHOICE */
{
Syntax* syntax;
ComponentDesc* comp_desc;
struct berval identifier;
char id_buf[MAX_IDENTIFIER_LEN];
enum TimeChoiceId
{
TIME_UTCTIME,
TIME_GENERALIZEDTIME
} choiceId;
union TimeChoiceUnion
{
ComponentUTCTime* utcTime; /* < unknown type id ?! > */
ComponentGeneralizedTime* generalizedTime; /* < unknown type id ?! > */
} a;
} ComponentTime;
int MatchingComponentTime PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
void* ExtractingComponentTime PROTO ((ComponentReference *cr, ComponentTime *comp ));
int BDecComponentTime PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentTime **v, AsnLen *bytesDecoded, int mode));
int GDecComponentTime PROTO ((GenBuf * b, ComponentTime **v, AsnLen *bytesDecoded, int mode));
void FreeComponentTime(ComponentTime *v);
typedef struct Extension /* SEQUENCE */
{
Syntax* syntax;
ComponentDesc* comp_desc;
struct berval identifier;
char id_buf[MAX_IDENTIFIER_LEN];
ComponentOid extnID; /* OBJECT IDENTIFIER */
ComponentOcts extnValue; /* OCTET STRING */
} ComponentExtension;
int MatchingComponentExtension PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
void* ExtractingComponentExtension PROTO ((ComponentReference *cr, ComponentExtension *comp ));
int BDecComponentExtension PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
int GDecComponentExtension PROTO ((GenBuf * b, ComponentExtension **v, AsnLen *bytesDecoded, int mode));
void FreeComponentExtension(ComponentExtension *v);
typedef struct AttributeTypeAndValue /* SEQUENCE */
{
Syntax* syntax;
ComponentDesc* comp_desc;
struct berval identifier;
char id_buf[MAX_IDENTIFIER_LEN];
ComponentAttributeType type; /* AttributeType */
ComponentAnyDefinedBy value; /* ANY DEFINED BY type */
} ComponentAttributeTypeAndValue;
int MatchingComponentAttributeTypeAndValue PROTO (( char *oid, ComponentSyntaxInfo *, ComponentSyntaxInfo *v2 ));
void* ExtractingComponentAttributeTypeAndValue PROTO ((ComponentReference *cr, ComponentAttributeTypeAndValue *comp ));
int BDecComponentAttributeTypeAndValue PROTO ((GenBuf * b, AsnTag tagId0, AsnLen elmtLen0, ComponentAttributeTypeAndValue **v, AsnLen *bytesDecoded, int mode));