| 294 | } |
| 295 | |
| 296 | int credential_has_capability(const struct credential_capability *capa, |
| 297 | enum credential_op_type op_type) |
| 298 | { |
| 299 | /* |
| 300 | * We're checking here if each previous step indicated that we had the |
| 301 | * capability. If it did, then we want to pass it along; conversely, if |
| 302 | * it did not, we don't want to report that to our caller. |
| 303 | */ |
| 304 | switch (op_type) { |
| 305 | case CREDENTIAL_OP_HELPER: |
| 306 | return capa->request_initial; |
| 307 | case CREDENTIAL_OP_RESPONSE: |
| 308 | return capa->request_initial && capa->request_helper; |
| 309 | default: |
| 310 | return 0; |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | int credential_read(struct credential *c, FILE *fp, |
| 315 | enum credential_op_type op_type) |
no outgoing calls
no test coverage detected