start library structure

This commit is contained in:
Klas Lindfors
2014-06-16 12:35:28 +02:00
parent 980c8656e9
commit fe5632e603
5 changed files with 76 additions and 1 deletions
+30
View File
@@ -26,3 +26,33 @@
* for the parts of OpenSSL used as well as that of the covered work.
*
*/
#include <stdlib.h>
#include <string.h>
#if BACKEND_PCSC
#if defined HAVE_PCSC_WINSCARD_H
# include <PCSC/wintypes.h>
# include <PCSC/winscard.h>
#else
# include <winscard.h>
#endif
#endif
#include "internal.h"
#include "ykpiv.h"
int ykpiv_init(ykpiv_state **state) {
ykpiv_state *s = malloc(sizeof(ykpiv_state));
if(s == NULL) {
return -1;
}
memset(s, 0, sizeof(ykpiv_state));
*state = s;
return 0;
}
int ykpiv_done(ykpiv_state *state) {
free(state);
return 0;
}