]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
ike: Support encoding of attribute certificates in CERT payloads
authorMartin Willi <martin@revosec.ch>
Wed, 5 Feb 2014 16:46:01 +0000 (17:46 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 31 Mar 2014 09:14:58 +0000 (11:14 +0200)
src/libcharon/encoding/payloads/cert_payload.c

index a32f5705dac7e6ef3601c83353d77351df594acb..05d41051bdfc13702c2df9d1214b75d1fa99761d 100644 (file)
@@ -224,6 +224,9 @@ METHOD(cert_payload_t, get_cert, certificate_t*,
                case ENC_X509_SIGNATURE:
                        type = CERT_X509;
                        break;
+               case ENC_X509_ATTRIBUTE:
+                       type = CERT_X509_AC;
+                       break;
                case ENC_CRL:
                        type = CERT_X509_CRL;
                        break;
@@ -333,6 +336,9 @@ cert_payload_t *cert_payload_create_from_cert(payload_type_t type,
                case CERT_X509:
                        this->encoding = ENC_X509_SIGNATURE;
                        break;
+               case CERT_X509_AC:
+                       this->encoding = ENC_X509_ATTRIBUTE;
+                       break;
                default:
                        DBG1(DBG_ENC, "embedding %N certificate in payload failed",
                                 certificate_type_names, cert->get_type(cert));
@@ -380,4 +386,3 @@ cert_payload_t *cert_payload_create_custom(payload_type_t type,
 
        return &this->public;
 }
-