]> git.sur5r.net Git - openldap/blobdiff - servers/ldapd/certificate.c
Use -llber set_nonblock implementation.
[openldap] / servers / ldapd / certificate.c
index 228d65a6e8ee0f072dd45d0424053b5e7f3b4416..be12fed1344a16aef6cab2127c52108be5e703b5 100644 (file)
@@ -3,23 +3,29 @@
  *                donated by Eric Rosenquist and BNR
  */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+
+#include <ac/ctype.h>
+#include <ac/socket.h>
+#include <ac/string.h>
+
 #include <quipu/commonarg.h>
 #include <quipu/attrvalue.h>
 #include <quipu/ds_error.h>
 #include <quipu/ds_search.h>
 #include <quipu/dap2.h>
 #include <quipu/dua.h>
+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 );
 
@@ -111,7 +117,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;
@@ -277,8 +284,6 @@ OID oid;
 void
 ldap_str2alg( char *str, struct alg_id *alg )
 {
-PE asn2pe();
-
   if ((str == NULLCP) || (*str == '\0'))
    {
      alg->asn = NULLPE;
@@ -302,13 +307,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