[Previous] [Next]

ldapu_get_cert_ava_val()

Gets the value of the given DN component from either the subject's DN or the CA's DN in a certificate.

Syntax
NSAPI_PUBLIC int ldapu_get_cert_ava_val (void *cert,
      int which_dn, const char *attr, char ***val);

Parameters
This function has the following parameters:
Name Description
cert
Certificate for which you want the DN component.

which_dn
Pass one of the following values for this argument:

attr
Specifies the DN component that you want the value of

(CN, OU, O, C, UID, MAIL, E, L, and ST).

val
An array of values for that DN component.

A DN component might have multiple values. For example:

cn=Babs Jensen, ou=Accounting, ou=Finance, o=Netscape, c=US

The last entry in the array is NULL.

Returns
Returns one of the following values:

Description
Call this function to get the value of a component in the certificate subject's DN or the CA's DN. If you want to get the entire DN, call ldapu_get_cert_subject_dn() or ldapu_get_cert_issuer_dn() instead.

You must free this array of strings after you are done with it. Call the function ldapu_free_cert_ava_val() to free this array. (If an error occurs, the val argument is initialized to NULL.)

See Also
ldapu_get_cert_subject_dn(), ldapu_get_cert_issuer_dn(), ldapu_get_cert_ava_val().


[Previous] [Next]


Copyright ⌐ 1997 Netscape Communications Corporation