File: xmlsecurity.c

package info (click to toggle)
r-cran-xml 3.99-0.18-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,688 kB
  • sloc: ansic: 6,656; xml: 2,890; asm: 486; sh: 12; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 671 bytes parent folder | download | duplicates (4)
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
#ifdef HAVE_LIBXMLSEC
#include <xmlsec/xmlsec.h>
#include <xmlsec/app.h>
#include <xmlsec/crypto.h>

#include "Rinternals.h"

void
R_xmlSecCryptoInit(int *els)
{
    int status;

    els[0] = status = xmlSecCryptoInit();
    if(status != 0)
	return;

    els[1] = status = xmlSecCryptoAppInit(NULL);
    if(status != 0)
	return;

    els[2] = status = xmlSecCryptoInit();
}

SEXP
R_xmlSecCryptoShutdown()
{
    int status;
    status = xmlSecCryptoShutdown();
    return(ScalarInteger(status));
}
#else
// avoid a warning about an empty translation unit.
// instead, this gives one about an unused variable!
// static int foo;
void R_xmlSecCryptoInit(int *els) {}
#endif