Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialize variables to avoid segfault. #2

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,27 @@ keystone-client

C client for OpenStack Keystone authentication service

Depends on libcurl and libjson-c.
Depends on libcurl.

Build library
=============
$ sudo apt install libcurl4-openssl-dev

$ gcc -g3 -c -pedantic -Wall -Wextra -Wformat-security -std=c18 -fpic \
keystone-client.c -lcurl \
&& gcc -shared -o libkeystone-client.so keystone-client.o

Build and run smoke test
========================
$ cd tests
$ gcc -g3 -L<PATH_TO_REPO> -Wall -Wextra -Wformat-security -std=c18 -o \
smoke_test smoke_test.c -lkeystone-client -lcurl

$ export KSTEST_ADMIN_URL=http://<IP_ADDRESS>/identity
$ export OS_PROJECT_NAME=admin
$ export KSTEST_ADMIN_USERNAME=admin
$ export KSTEST_ADMIN_PASSWORD=secret

$ export LD_LIBRARY_PATH=<PATH_TO_REPO>:$LD_LIBRARY_PATH

$ ./smoke_test
Loading