From 111bb96e68b7c83eb65a73786904d1efb3cd3054 Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Tue, 11 May 2010 12:42:56 +0000
Subject: [PATCH] SAMLBuilder: Use the new createKeyDescriptor() function.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2292 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Metadata/SAMLBuilder.php | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/lib/SimpleSAML/Metadata/SAMLBuilder.php b/lib/SimpleSAML/Metadata/SAMLBuilder.php
index 052f55502..aeffb1af6 100644
--- a/lib/SimpleSAML/Metadata/SAMLBuilder.php
+++ b/lib/SimpleSAML/Metadata/SAMLBuilder.php
@@ -569,20 +569,9 @@ class SimpleSAML_Metadata_SAMLBuilder {
 		assert('in_array($use, array("encryption", "signing"), TRUE)');
 		assert('is_string($x509data)');
 
-		$keyDescriptor = new SAML2_XML_md_KeyDescriptor();
+		$keyDescriptor = SAML2_Utils::createKeyDescriptor($x509data);
 		$keyDescriptor->use = $use;
 		$rd->KeyDescriptor[] = $keyDescriptor;
-
-		$keyInfo = new SAML2_XML_ds_KeyInfo();
-		$keyDescriptor->KeyInfo = $keyInfo;
-
-		$x509Data = new SAML2_XML_ds_X509Data();
-		$keyInfo->info[] = $x509Data;
-
-		$x509Certificate = new SAML2_XML_ds_X509Certificate();
-		$x509Data->data[] = $x509Certificate;
-
-		$x509Certificate->certificate = $x509data;
 	}
 
 
-- 
GitLab