| 338 | | enumerator = auth->create_item_enumerator(auth); |
|---|
| 339 | | while (enumerator->enumerate(enumerator, &item, &cert)) |
|---|
| 340 | | { |
|---|
| 341 | | if (item == AUTHN_CA_CERT) |
|---|
| 342 | | { |
|---|
| 343 | | restricted = TRUE; |
|---|
| 344 | | add_certreq_payload(message, &x509_req, cert); |
|---|
| 345 | | } |
|---|
| 346 | | } |
|---|
| 347 | | enumerator->destroy(enumerator); |
|---|
| | 336 | peer_cfg = this->ike_sa->get_peer_cfg(this->ike_sa); |
|---|
| | 337 | if (peer_cfg) |
|---|
| | 338 | { |
|---|
| | 339 | auth_item_t item; |
|---|
| | 340 | auth_info_t *auth = peer_cfg->get_auth(peer_cfg); |
|---|
| | 341 | |
|---|
| | 342 | enumerator = auth->create_item_enumerator(auth); |
|---|
| | 343 | while (enumerator->enumerate(enumerator, &item, &cert)) |
|---|
| | 344 | { |
|---|
| | 345 | if (item == AUTHZ_CA_CERT) |
|---|
| | 346 | { |
|---|
| | 347 | restricted = TRUE; |
|---|
| | 348 | add_certreq_payload(message, &x509_req, cert); |
|---|
| | 349 | } |
|---|
| | 350 | /* TODO: handle AUTHZ_CA_CERT_NAME case */ |
|---|
| | 351 | } |
|---|
| | 352 | enumerator->destroy(enumerator); |
|---|
| | 353 | } |
|---|