Alibwliapi example
This example demonstrates how libwliapi functions add and delete WLI file access policies.
A.1 Instructions
This example requires an authorized WLI administrator key.
<admin_key> | WLI administrator's private key |
<admin_pass> | Passphrase for <admin_key> |
1.Copy the makefile and source files below to a test directory.
2.% su root
3.The makefile builds executables, adds user wliusr1, and generates ukey.pvt
# make all
4.# wlicert
5.# wlicert
6.# su wliusr1
7.% wlisign
8.% wlisign
9.% api_flac_test
10.% api_ibac_test
Cleanup:
1.# wlicert
2.# make clean
A.2 makefile
#Makefile for exercising libwliapi functions SHELL = /bin/sh
CC = cc LD = ld CFLAGS = +DD64
INCLUDES =
#make secure binaries
LDOPTS = +noenvvar +nodefaultrpath +b/opt/wli/lib
LDPATH =
#LIBS =
COMPILE = $(CC) $(CFLAGS) $(INCLUDES)
.c.o:
$(COMPILE)
all: user_setup progs
progs: api_flac_test api_ibac_test
api_flac_test: api_flac_test.o
$(LD)
api_ibac_test: api_ibac_test.o
$(LD)
ukey.pvt:
openssl genrsa
ukey.pub: ukey.pvt
A.1 Instructions | 45 |