summaryrefslogtreecommitdiffstats
path: root/RPM4/src/RPM4sign.c
blob: 04bb60f33587c6246bd4dd9645ea647921bdc360 (plain)
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
/* $Id$ */

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#undef Fflush
#undef Mkdir
#undef Stat

#include <rpm/rpmcli.h>

#include "RPM4.h"

/* Hight level function */
int rpmsign(char *passphrase, const char *rpm) {
    QVA_t qva = &rpmQVKArgs;
    const char * file[2];

    file[0] = rpm;
    file[1] = NULL;

    qva->qva_mode = RPMSIGN_ADD_SIGNATURE;
    qva->passPhrase = passphrase;
    
    return rpmcliSign(NULL, qva, file);
}