start library structure
This commit is contained in:
+30
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user