token_set_write_protected (CK_TOKEN_INFO *token, P11KitUri *uri)
{
	const char *write_protected =
		p11_kit_uri_get_vendor_query (uri, "write-protected");
	if (write_protected &&
	    _p11_conf_parse_boolean (write_protected, false))
		token->flags |= CKF_WRITE_PROTECTED;
	else
		token->flags &= ~CKF_WRITE_PROTECTED;
}
token_set_write_protected (CK_TOKEN_INFO *token, P11KitUri *uri)
{
	const char *write_protected =
		p11_kit_uri_get_vendor_query (uri, "write-protected");
	if (write_protected &&
	    _p11_conf_parse_boolean (write_protected, false))
		token->flags |= CKF_WRITE_PROTECTED;
	else
		token->flags &= ~CKF_WRITE_PROTECTED;
}