1 /******************************************************************************
2 * Copyright (c) 2000-2016 Ericsson Telecom AB
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * which accompanies this distribution, and is available at
6 * http://www.eclipse.org/legal/epl-v10.html
10 * Szabo, Janos Zoltan – initial implementation
12 ******************************************************************************/
17 int main(int argc
, char *argv
[])
26 fprintf(stderr
, "Usage: %s private_key.pem\n", argv
[0]);
31 lstr
.licensee_name
= "Janos Zoltan Szabo";
32 lstr
.licensee_email
= "Szabo.Janos@eth.ericsson.se";
33 lstr
.licensee_company
= "Conformance Lab, "
34 "Ericsson Hungary Ltd.";
35 lstr
.licensee_department
= "ETH/RL/S";
37 tm_struct
.tm_year
= 2001 - 1900;
38 tm_struct
.tm_mon
= 1 - 1;
39 tm_struct
.tm_mday
= 1;
40 tm_struct
.tm_hour
= 0;
43 lstr
.valid_from
= mktime(&tm_struct
);
45 tm_struct
.tm_year
= 2001 - 1900;
46 tm_struct
.tm_mon
= 12 - 1;
47 tm_struct
.tm_mday
= 31;
48 tm_struct
.tm_hour
= 23;
49 tm_struct
.tm_min
= 59;
50 tm_struct
.tm_sec
= 59;
51 lstr
.valid_until
= mktime(&tm_struct
);
53 lstr
.host_id
= 0x80b33fd0;
54 lstr
.login_name
= "tmpjsz";
57 lstr
.from_patchlevel
= 0;
60 lstr
.to_patchlevel
= 99;
62 lstr
.feature_list
= TTCN3_PARSER
|
70 lstr
.limitation_type
= LIMIT_HOST
| LIMIT_USER
;
74 encode_license(&lraw
, &lstr
);
75 sign_license(&lraw
, argv
[1]);
76 write_license("license.dat", &lraw
);
78 fprintf(stderr
, "License file generated.\n");
80 read_license("license.dat", &lraw
);
81 check_license_signature(&lraw
);
82 decode_license(&lstr
, &lraw
);
84 verify_license(&lstr
, 1, 1, 8);
This page took 0.032559 seconds and 5 git commands to generate.