#include <cat/cat.h>
int catpac_openears(cat_session *sess, catpac_ear **ep, const char *service, const char *version, const char *method);
version can be specified as follows:
Example: "1.0"
will only match UARs with version 1.0.
Example: "1.*"
will match all versions with the major number ``1''.
Example: ``1.0-2.0'' will match every version from 1.0 to 2.0 inclusive.
A return value of zero indicates that no UARs matching the above criteria could be found, although the PAC was opened successfully. This should normally be handled as an authorization error. The ep pointer can still be used to get the username, with catear_getlogid.
A negative return value means that the peer certificate was not a PAC. This is normally handled as an authorization error.
catpac_closeear, catpsd_setpsd, catear_getlogid