Lines Matching full:we
97 * Sample application. We do the following:
105 * Since this is a sample application, we won't be actually reading any
116 * We are creating a new KeyNote session here. A session may be temporary in main()
117 * (we create it, add policies, credentials, authorizers, action set, do in main()
118 * the query, and then we destroy it), or it may be persistent (if, for in main()
121 * In this example, we'll just assume the session is temporary, but there in main()
132 * Assume we have read a file, or somehow securely acquired our policy in main()
133 * assertions, and we have stored them in policy_assertions. in main()
136 /* Let's find how many policies we just "read". */ in main()
147 * we'll get a valid pointer back, which we need to free. Note that this in main()
148 * is an error; we always MUST have at least one policy assertion. in main()
158 * We no longer need a copy of policy_assertions, so we could in main()
164 * single assertion. We now add them all to the session. Note that in main()
165 * we must provide the ASSERT_FLAG_LOCAL flag to indicate that these in main()
196 /* We don't need the assertion any more. */ in main()
205 * Now, assume we have somehow acquired (through some application-dependent in main()
208 * we would have acquired the credential(s) and the key after completing in main()
211 * So, we have some credentials in credential_assertions, and a key in main()
215 /* Let's find how many credentials we just "received". */ in main()
227 * we'll get a valid pointer back, which we need to free. Note that in main()
237 * We no longer need a copy of credential_assertions, so we could in main()
243 * single assertion. We now add them all to the session. Note that here in main()
244 * we must NOT provide the ASSERT_FLAG_LOCAL flag, since these are in main()
251 * assertion (unless it's a -1, which indicates an error). We could in main()
253 * if we needed to. We would need to store the IDs somewhere of in main()
257 * the credentials we just added after we are done with the query, in main()
258 * simply to conserve memory. On the other hand, we could just leave in main()
261 * Also note that we could do the same with policy assertions. in main()
262 * However, if we want to delete policy assertions, it usually then in main()
292 /* We don't need the assertion any more. */ in main()
301 * Now add the action authorizer. If we have more than one, just in main()
303 * failure indicator. If we want to later on delete an authorizer from in main()
304 * the session (which we MUST do if this is a persistent session), in main()
305 * we must keep a copy of the key. in main()
333 * If we don't need action_authorizer any more (i.e., this is a temporary in main()
334 * session), we could free it now. in main()
338 * Now we need to construct the action set. In a real application, we in main()
339 * would be gathering the relevant information. Here, we just construct in main()
344 * Add the relevant action attributes. Flags is zero, since we are not in main()
491 * Once the query is done, we can find what assertions failed in what way. in main()