allow to override platform info
authorAndreas Steffen <andreas.steffen@strongswan.org>
Wed, 7 Sep 2011 05:48:08 +0000 (07:48 +0200)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Thu, 8 Sep 2011 10:08:17 +0000 (12:08 +0200)
src/libimcv/plugins/imc_attestation/imc_attestation_state.c

index cacc62a..9087b71 100644 (file)
@@ -77,6 +77,7 @@ METHOD(imc_attestation_state_t, get_pts, pts_t*,
 imc_state_t *imc_attestation_state_create(TNC_ConnectionID connection_id)
 {
        private_imc_attestation_state_t *this;
+       char *platform_info;
 
        INIT(this,
                .public = {
@@ -91,6 +92,13 @@ imc_state_t *imc_attestation_state_create(TNC_ConnectionID connection_id)
                .state = TNC_CONNECTION_STATE_CREATE,
                .pts = pts_create(TRUE),
        );
+
+       platform_info = lib->settings->get_str(lib->settings,
+                                                "libimcv.plugins.imc-attestation.platform_info", NULL);
+       if (platform_info)
+       {
+               this->pts->set_platform_info(this->pts, platform_info);
+       }
        
        return &this->public.interface;
 }