summaryrefslogtreecommitdiffstats
path: root/ldap/clients/dsgw/ckpurge.c
blob: b2192476ae420c67071f57687c1c87499a34d90f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 * PROPRIETARY/CONFIDENTIAL. Use of this product is subject to
 * license terms. Copyright © 2001 Sun Microsystems, Inc.
 * Some preexisting portions Copyright © 2001 Netscape Communications Corp.
 * All rights reserved.
 */

#include <stdio.h>
#include "dsgw.h"

#include <ssl.h>
#include <sec.h>

main()
{
    char *p;
    time_t expires;
    char dn[ 512 ];
    char pw[ 512 ];
    char expsec[ 512 ];
    int np = 0;
    time_t last;
    FILE *fp;
    
    printf( "purge the cookie database\n" );

    fp = dsgw_opencookiedb();
    last = dsgw_getlastpurged( fp );
    dsgw_closecookiedb( fp );
    printf( "database was last purged at %s\n", ctime( &last ));
    np = dsgw_purgedatabase( NULL );
    printf( "%d records purged\n", np );
}