[strongSwan] How to use the strongswan library as API calls to strongswan so
Martin Willi
martin at strongswan.org
Fri May 7 17:02:06 CEST 2010
Hi,
> If I can use the strongswan defined API in the so library in my code
> to do all the functionality supported
Yes. strongSwan has a generic utility and crypto library called
libstrongswan. It is used by many tools shipped with the strongSwan
distribution.
Starting with the recently released version 4.4.0, we introduced two new
libraries, libcharon and libhydra. libcharon is a very high level
library for IKEv2, the charon daemon provides its functionality using
it. libhydra provides some shared classes used by libcharon and the
IKEv1 keying daemon pluto.
> can you plz clarify if this is possible / advisable
Yes it is. Depends on what you actually want to do. libstrongswan is a
useful crypto and utility library. libcharon might be interesting if you
want to integrate the strongSwan IKEv2 functionality into another
application.
However, we do not provide a stable ABI or API for our libraries! It
will take continuous effort if you want to keep your own code up to date
with new strongSwan releases.
If you are looking for a simple example how to work with libstrongswan,
have a look at scripts/pubkey_speed.c. It should give you an idea how to
initialize the library, load plugins and do some basic private/public
key handling.
> and if yes then is there any documentation or any hint of starting
> point to explore the APIs that you can provide.
The APIs are well documented, run "make apidoc". If you have doxygen
installed, it will generate the API under apidoc/index.html.
Regards
Martin
More information about the Users
mailing list