func cleanup(ctx *pkcs11.Ctx, session pkcs11.SessionHandle) { ctx.Destroy() ctx.Finalize() ctx.CloseSession(session) ctx.Logout(session) }