-
Notifications
You must be signed in to change notification settings - Fork 0
/
KEYPKI
56 lines (50 loc) · 1.49 KB
/
KEYPKI
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#ifndef KEYPKI_INCLUDE
#define KEYPKI_INCLUDE
int GENPKIGEN(
char ** pData,
int * lData)
{
int rc;
int rs;
int zero = 0;
int lOutput= 6500;
char * pOutput;
pOutput = (char * ) malloc(lOutput);
char nullTransportKey[64];
memset(&nullTransportKey[0],0,64);
//?key type AES and used for OP (on this system
int rule_count = 1;
char8 rule[2] = {"MASTER " };
// ,"KEY-AES "};
char * pRule = & rule[0][0];
char * pRegen = "ColinsRegen";
int lRegen = strlen(pRegen);
lRegen = 0;
int ll = *lData;
CSNDPKG(
&rc , /* return code */
&rs , /* reason code */
&zero, /* exit data length 0*/
0, /* exit data[] 0*/
&rule_count, /* rule array count ! */
pRule, /* rule array[] ! */
&lRegen, /* L regen string */
pRegen, /* private ! */
&ll, // length of skeleton
*pData, // the skeleton
&nullTransportKey[0], /* */
&lOutput,
pOutput
); /* output key id2[] ! */
//if ( rc > 0)
{
printf("KEYPKI:CSNDPKG rc %i rs %i %s\n",
rc,rs,csfgetrc(rs));
return rc;
}
free(*pData);
*pData = pOutput;
* lData = lOutput;
return rc;
}
#endif