1 /* done.c deconstructor
2 * Copyright (C) 2002 Simon Josefsson
4 * This file is part of Shishi.
6 * Shishi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * Shishi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with Shishi; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 * @handle: shishi handle as allocated by shishi_init().
28 * Deallocates the shishi library handle. The handle must not be used
29 * in any calls to shishi functions after this. If there is a default
30 * ticketset, it is written to the default ticketset file (call
31 * shishi_ticketset_default_file_set() to change the default ticketset
32 * file). If you do not wish to write the default ticketset file,
33 * close the default ticketset with shishi_ticketset_done(handle,
34 * NULL) before calling this function.
37 shishi_done (Shishi
* handle
)
41 if (handle
->ticketset
)
43 shishi_ticketset_to_file (handle
, handle
->ticketset
,
44 shishi_ticketset_default_file (handle
));
46 if (handle
->ticketset
)
47 shishi_ticketset_done (handle
, handle
->ticketset
);
50 /* if (handle->default_realm)
51 free (handle->default_realm); */
52 if (handle
->usercfgfile
)
53 free (handle
->usercfgfile
);
54 if (handle
->ticketsetdefaultfile
)
55 free (handle
->ticketsetdefaultfile
);
58 asn1_delete_structure (&handle
->asn1
);