在 Go 中使用无 cgo 的 PKCS#11 模块
This project implements p11-kit RPC server protocol, allowing Go programs to act as a PKCS #11 module without the need for cgo. Clients load the p11-kit-client.so shared library, then communicate over RPC to the Go server.
------------------------
| client (e.g. Chrome) |
------------------------
|
(PKCS #11 - shared library)
↓
---------------------
| p11-kit-client.so |
---------------------
|
(RPC over unix socket)
↓
---------------------------------------
| github.com/google/go-p11-kit/p11kit |
---------------------------------------The example directory contains a demo server that reads keys and certificates from disk and serves them on a unix socket. To build and start the server, run the following commands:
go build -o bin/example-p11-kit-server ./example/example-p11-kit-server
./bin/example-p11-kit-server --priv example/priv.pem --pub example/pub.pem --cert example/cert.pemThe server will print out an environment variable to set similar to:
export P11_KIT_SERVER_ADDRESS=unix:path=/tmp/1056705225/p11kit.sockIn another shell, export the environment variable, and use p11-kit-client.so to query the example server:
…暂无开放 Issues,或尚未同步最近议题。