summaryrefslogtreecommitdiff
path: root/vendor/github.com/miekg/pkcs11/pkcs11go.h
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-09 18:35:09 +0100
committerGitHub <noreply@github.com>2021-02-09 18:35:09 +0100
commit763d522983b819ecd38689c9c0840069d1e2b530 (patch)
treec4d469f69a056e2058dc1530df7e2b6ac3f3eafa /vendor/github.com/miekg/pkcs11/pkcs11go.h
parentf98605e0e4f25c148b27cc617976357ff5b9d96e (diff)
parent08d8290f1d65a254b6794f7fe87a6f769b2ca792 (diff)
downloadpodman-763d522983b819ecd38689c9c0840069d1e2b530.tar.gz
podman-763d522983b819ecd38689c9c0840069d1e2b530.tar.bz2
podman-763d522983b819ecd38689c9c0840069d1e2b530.zip
Merge pull request #9281 from containers/dependabot/go_modules/github.com/containers/ocicrypt-1.1.0
Bump github.com/containers/ocicrypt from 1.0.3 to 1.1.0
Diffstat (limited to 'vendor/github.com/miekg/pkcs11/pkcs11go.h')
-rw-r--r--vendor/github.com/miekg/pkcs11/pkcs11go.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/vendor/github.com/miekg/pkcs11/pkcs11go.h b/vendor/github.com/miekg/pkcs11/pkcs11go.h
new file mode 100644
index 000000000..1b98bad21
--- /dev/null
+++ b/vendor/github.com/miekg/pkcs11/pkcs11go.h
@@ -0,0 +1,33 @@
+//
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+//
+
+#define CK_PTR *
+#ifndef NULL_PTR
+#define NULL_PTR 0
+#endif
+#define CK_DEFINE_FUNCTION(returnType, name) returnType name
+#define CK_DECLARE_FUNCTION(returnType, name) returnType name
+#define CK_DECLARE_FUNCTION_POINTER(returnType, name) returnType (* name)
+#define CK_CALLBACK_FUNCTION(returnType, name) returnType (* name)
+
+#include <unistd.h>
+#ifdef PACKED_STRUCTURES
+# pragma pack(push, 1)
+# include "pkcs11.h"
+# pragma pack(pop)
+#else
+# include "pkcs11.h"
+#endif
+
+// Copy of CK_INFO but with default alignment (not packed). Go hides unaligned
+// struct fields so copying to an aligned struct is necessary to read CK_INFO
+// from Go on Windows where packing is required.
+typedef struct ckInfo {
+ CK_VERSION cryptokiVersion;
+ CK_UTF8CHAR manufacturerID[32];
+ CK_FLAGS flags;
+ CK_UTF8CHAR libraryDescription[32];
+ CK_VERSION libraryVersion;
+} ckInfo, *ckInfoPtr;