File: test_api_directives.c

package info (click to toggle)
openscap 1.4.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 125,116 kB
  • sloc: xml: 527,136; ansic: 91,867; sh: 19,831; python: 2,531; perl: 444; makefile: 49
file content (28 lines) | stat: -rw-r--r-- 566 bytes parent folder | download | duplicates (5)
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

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include <stdlib.h>
#include <stdio.h>
#include "oval_agent_api.h"
#include "oval_results.h"
#include "oscap.h"
#include "oscap_source.h"

int main(int argc, char *argv[]) {
	struct oval_directives_model *model;

	model=oval_directives_model_new();

	struct oscap_source *source = oscap_source_new_from_file(argv[1]);
	oval_directives_model_import_source(model, source);
	oscap_source_free(source);
	oval_directives_model_export(model, argv[2]);

	oval_directives_model_free(model);
	oscap_cleanup();
	return 0;
}