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
|
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
|
-
+
-
+
|
#ifndef CACKEY_CHROME_CACKEY_H
#define CACKEY_CHROME_CACKEY_H 1
# ifdef __cplusplus
extern "C" {
# endif
#include <stddef.h>
struct cackey_certificate {
size_t certificate_len;
unsigned char *certificate;
void *certificate;
};
typedef enum {
CACKEY_CHROME_OK,
CACKEY_CHROME_ERROR,
CACKEY_CHROME_NEEDLOGIN,
CACKEY_CHROME_NEEDPROTECTEDLOGIN
} cackey_chrome_returnType;
int cackey_chrome_listCertificates(struct cackey_certificate **certificates);
void cackey_chrome_freeCertificates(struct cackey_certificate *certificates, int certificatesCount);
cackey_chrome_returnType cackey_chrome_signMessage(struct cackey_certificate *certificate, void *data, unsigned long dataLength, unsigned char *destination, unsigned long *destinationLength, char **pinPrompt, char *pin);
cackey_chrome_returnType cackey_chrome_signMessage(struct cackey_certificate *certificate, void *data, unsigned long dataLength, void *destination, unsigned long *destinationLength, char **pinPrompt, const char *pin);
void cackey_chrome_terminate(void);
# ifdef __cplusplus
}
# endif
|