[Previous] [Next]

ldapu_certmap_info_attrval()

Gets values for the given attribute/property from the given certmap_info structure.

Syntax
NSAPI_PUBLIC 
int ldapu_certmap_info_attrval (void *certmap_info,
      const char *attr, char **val);
Parameters
This function has the following parameters:
Name Description
certmap_info
This structure contains information about the configuration parameters for a specified CA.

attr
Name of the attribute/property that you want the value of. (See the list of properties below.) You can also specify your own property name.

val
Value of the specified attribute/property.

The following table lists the names of the standard attributes in the certmap.conf file. You can pass these names in the attr argument to the function.
Table 1.1 Standard attributes in the certmap_info structure
Attribute Name Description
LDAPU_ATTR_INITFN
Initialization function for the CA.

This is the InitFn setting in the certmap.conf file.

LDAPU_ATTR_LIBRARY
Shared library or dynamic library in which to find the initialization function.

This is the library setting in the certmap.conf file.

LDAPU_ATTR_DNCOMPS
DN components from the certificate subject's DN that should be used to assemble the base DN to search for the subject's entry.

This is the DNComps setting in the certmap.conf file and is used by the default certificate mapping function.

LDAPU_ATTR_FILTERCOMPS
DN components from the certificate subject's DN that should be used to assemble the filter to search for the subject's entry.

This is the FilterComps setting in the certmap.conf file and is used by the default certificate mapping function.

LDAPU_ATTR_VERIFYCERT
Specifies whether or not certificate verification procedures should be performed.

This is the VerifyCert setting in the certmap.conf file.

LDAPU_ATTR_CERTMAP_LDAP_ATTR
If the schema for the user entry defines an attribute that stores the certificate subject DN, specifies the name of that attribute.

For example, you may defined your schema to include a certSubjectDN attribute (for storing the user's certificate subject DN).

This is the CmapLdapAttr setting in the certmap.conf file and is used by the default certificate search function.

Returns
Returns one of the following values:

Description
Call this function to get the configuration settings for a CA. These settings are specified in the certmap.conf file and are loaded into memory as a certmap_info structure.

You can get handle to the certmap_info structure in the following ways:

You can also call this function to get the value of your own entries in the certmap.conf file. For example, suppose you add the attribute custom_name with the value custom_value:

certmap ace ou=Ace Certificate Authority, o=Ace Industry, c=US 
ace:library /export/netscape/suitespot/userdb/example.so 
ace:InitFn plugin_init_fn 
ace:DNComps o, c 
ace:FilterComps mail, uid 
ace:verifycert on 
ace:custom_name custom_value 
You can get the value of this attribute (custom_value) by calling this function:

ldapu_certmap_info_attrval( certmap_info, "custom_name", &my_val );
After you are done working with the value in the val argument, you should free it by calling ldapu_free().

See Also
ldapu_issuer_certinfo(), ldapu_free().


[Previous] [Next]


Copyright ⌐ 1997 Netscape Communications Corporation