])
dnl Checks for programs.
+PKG_PROG_PKG_CONFIG
AC_PROG_CC
gl_EARLY
ggl_EARLY
AC_DEFINE_UNQUOTED([SYSTEM_PRIORITY_FILE],
["$system_priority_file"], [The system priority file])
+
dnl Check for p11-kit
P11_KIT_MINIMUM=0.20.0
AC_ARG_WITH(p11-kit,
else
GNUTLS_REQUIRES_PRIVATE="${GNUTLS_REQUIRES_PRIVATE}, p11-kit-1"
fi
+ if $PKG_CONFIG --atleast-version=2.20.6 p11-kit; then
+ AC_DEFINE([HAVE_PKCS11X_H], 1, [There is p11-kit/pkcs11x.h])
+ fi
else
with_p11_kit=no
AC_MSG_WARN([[
}
}
-#ifndef CKA_X_DISTRUSTED
-# define CKA_X_VENDOR (CKA_VENDOR_DEFINED | 0x58444700UL)
-# define CKA_X_DISTRUSTED (CKA_X_VENDOR + 100)
-#endif
-
static int
find_cert_cb(struct pkcs11_session_info *sinfo,
struct token_info *info, struct ck_info *lib_info, void *input)
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
-#define HAVE_PKCS11X_H
-
#include <gnutls_int.h>
#include <gnutls/pkcs11.h>
#include <gnutls_global.h>
#include <pkcs11_int.h>
#include <p11-kit/p11-kit.h>
-#ifdef HAVE_PKCS11X_H
-# include "pkcs11x.h"
-#endif
+#include "pkcs11x.h"
struct find_ext_data_st {
/* in */
#ifndef PKCS11X_H
#define PKCS11X_H
-#include <p11-kit/pkcs11x.h>
+#ifdef HAVE_PKCS11X_H
+# include <p11-kit/pkcs11x.h>
+#else
+
+# include <p11-kit/pkcs11.h>
+
+# ifndef CKA_X_VENDOR
+# define CKA_X_VENDOR (CKA_VENDOR_DEFINED | 0x58444700UL)
+# endif
+
+# ifndef CKO_X_VENDOR
+# define CKO_X_VENDOR (CKA_VENDOR_DEFINED | 0x58444700UL)
+# endif
+
+# ifndef CKA_X_DISTRUSTED
+# define CKA_X_DISTRUSTED (CKA_X_VENDOR + 100)
+# endif
+
+# ifndef CKO_X_CERTIFICATE_EXTENSION
+# define CKO_X_CERTIFICATE_EXTENSION (CKO_X_VENDOR + 200)
+# endif
+
+# ifndef CKA_PUBLIC_KEY_INFO
+# define CKA_PUBLIC_KEY_INFO 0x00000129UL
+# endif
+
+#endif
#endif