X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fldapd%2Fcertificate.c;h=59030469fc76ea74fbcf4c8e593395b5476f0901;hb=403f4479bc9f9a864122d4aeecf7284408918302;hp=1299b0cf55fa53e922738e3f6296979fbd703ce4;hpb=2a869f5a99f537b246ba8640502e2a86117cb6e8;p=openldap diff --git a/servers/ldapd/certificate.c b/servers/ldapd/certificate.c index 1299b0cf55..59030469fc 100644 --- a/servers/ldapd/certificate.c +++ b/servers/ldapd/certificate.c @@ -1,3 +1,4 @@ +/* $OpenLDAP$ */ /* * certificate.c - ldap version of quipu certificate syntax handler * donated by Eric Rosenquist and BNR @@ -17,12 +18,15 @@ #include #include #include +extern sntx_table *get_syntax_table( short int sntx ); +extern PE asn2pe( char * ); #include "lber.h" #include "ldap.h" #include "common.h" -int ldap_certif_print( PS ps, struct certificate *parm, int format ) +int +ldap_certif_print( PS ps, struct certificate *parm, int format ) { Debug( LDAP_DEBUG_TRACE, "ldap_certif_print()\n", 0, 0, 0 ); @@ -114,7 +118,8 @@ ldap_print_algid( PS ps, struct alg_id *parm, int format ) } } -struct certificate *ldap_str2cert( char *str ) +struct certificate * +ldap_str2cert( char *str ) { struct certificate *result; char *ptr; @@ -280,8 +285,6 @@ OID oid; void ldap_str2alg( char *str, struct alg_id *alg ) { -PE asn2pe(); - if ((str == NULLCP) || (*str == '\0')) { alg->asn = NULLPE; @@ -305,13 +308,12 @@ PE asn2pe(); } } -void certif_init() +void +certif_init( void ) { - extern short ldap_certif_syntax; sntx_table *syntax_table; - extern sntx_table *get_syntax_table(); - if (syntax_table = get_syntax_table(ldap_certif_syntax)) { + if ((syntax_table = get_syntax_table(ldap_certif_syntax)) != NULL) { syntax_table->s_print = (void *) ldap_certif_print; syntax_table->s_parse = (void *) ldap_str2cert; } else