669 lines
24 KiB
C#
669 lines
24 KiB
C#
//----------------------------------------------------------------------------
|
|
//
|
|
// Copyright (c) Intel Corporation, 2003 - 2012 All Rights Reserved.
|
|
//
|
|
// File: AMT_PublicKeyManagementService.cs
|
|
//
|
|
// Contents: This service contains the information necessary to represent and manage the functionality provided by the Intel(R) AMT CertStore.
|
|
// This file was automatically generated from AMT_PublicKeyManagementService.mof
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Collections.ObjectModel;
|
|
using System.Text;
|
|
using System.Globalization;
|
|
using System.Xml.Serialization;
|
|
using System.IO;
|
|
using Intel.Manageability.WSManagement;
|
|
using Intel.Manageability.Cim.Untyped;
|
|
|
|
|
|
namespace Intel.Manageability.Cim.Typed
|
|
{
|
|
/// <summary>
|
|
///This service contains the information necessary to represent and manage the functionality provided by the Intel(R) AMT CertStore.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService")]
|
|
[System.Xml.Serialization.XmlRootAttribute("AMT_PublicKeyManagementService", Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
public class AMT_PublicKeyManagementService : CIM_CredentialManagementService
|
|
{
|
|
/// <summary>
|
|
/// Default constructor.
|
|
/// </summary>
|
|
public AMT_PublicKeyManagementService() :base()
|
|
{
|
|
}
|
|
/// <summary>
|
|
/// Constructor that recieves an xml string for deserialization.
|
|
/// </summary>
|
|
/// <param name="xml">xml string to deserialize</param>
|
|
public AMT_PublicKeyManagementService(string xml): base((IWSManClient)null)
|
|
{
|
|
this.Deserialize(xml);
|
|
}
|
|
/// <summary>
|
|
/// Constructor which recieves a Ws-Management client object.
|
|
/// </summary>
|
|
/// <param name="client">Ws-Management client</param>
|
|
public AMT_PublicKeyManagementService(IWSManClient client): base(client)
|
|
{
|
|
}
|
|
/// <summary>
|
|
///This call adds a Certificate revocation list to be used by the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddCRL_INPUT : CimParams
|
|
{
|
|
public AddCRL_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, The issuer URL of the revoked certificates.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual string Url
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("Url",value);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Optional, Notice: the values of this array are actually base64 encoded values. A list of serial numbers removed by the CA which is specified in the Url variable.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual string[] SerialNumbers
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("SerialNumbers",value);
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This call adds a Certificate revocation list to be used by the Intel(R) AMT device.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddCRL_OUTPUT : CimParams
|
|
{
|
|
public AddCRL_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Reference to the new AMT_CRL instance.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference CRL
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("CRL")[0];
|
|
CimReference epr = new CimReference("CRL", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This call adds a Certificate revocation list to be used by the Intel(R) AMT device.
|
|
/// </summary>
|
|
/// <param name="inUrl">Optional, IN -The issuer URL of the revoked certificates.</param>
|
|
/// <param name="inSerialNumbers">Optional, IN -Notice: the values of this array are actually base64 encoded values. A list of serial numbers removed by the CA which is specified in the Url variable.</param>
|
|
/// <param name="outCRL">OUT - Reference to the new AMT_CRL instance.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_MAX_LIMIT_REACHED : 23
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// </returns>
|
|
public virtual uint AddCRL(string inUrl,string[] inSerialNumbers,out CimReference outCRL)
|
|
{
|
|
AddCRL_INPUT input = new AddCRL_INPUT(this.XmlNamespace);
|
|
if (inUrl != null)
|
|
input.Url=inUrl;
|
|
if (inSerialNumbers != null)
|
|
input.SerialNumbers=inSerialNumbers;
|
|
AddCRL_OUTPUT output = new AddCRL_OUTPUT();
|
|
uint returnValue = base.Invoke("AddCRL",input,out output);
|
|
outCRL=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("CRL"))
|
|
outCRL = output.CRL;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///Remove the usage of CRL during the authentication process
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class ResetCRLList_INPUT : CimParams
|
|
{
|
|
public ResetCRLList_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///Remove the usage of CRL during the authentication process
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class ResetCRLList_OUTPUT : CimParams
|
|
{
|
|
public ResetCRLList_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
}
|
|
/// <summary>
|
|
///Remove the usage of CRL during the authentication process
|
|
/// </summary>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// </returns>
|
|
public virtual uint ResetCRLList()
|
|
{
|
|
ResetCRLList_INPUT input = new ResetCRLList_INPUT(this.XmlNamespace);
|
|
ResetCRLList_OUTPUT output = new ResetCRLList_OUTPUT();
|
|
uint returnValue = base.Invoke("ResetCRLList",input,out output);
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This function adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddCertificate_INPUT : CimParams
|
|
{
|
|
public AddCertificate_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required,
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual byte[] CertificateBlob
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("CertificateBlob",Convert.ToBase64String(value));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This function adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddCertificate_OUTPUT : CimParams
|
|
{
|
|
public AddCertificate_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Certificate encoded in X.509 format
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference CreatedCertificate
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("CreatedCertificate")[0];
|
|
CimReference epr = new CimReference("CreatedCertificate", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This function adds new certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
/// <param name="inCertificateBlob">Required, IN -</param>
|
|
/// <param name="outCreatedCertificate">OUT - Certificate encoded in X.509 format</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_MAX_LIMIT_REACHED : 23
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// PT_STATUS_DUPLICATE : 2058
|
|
/// PT_STATUS_INVALID_CERT : 2063
|
|
/// </returns>
|
|
public virtual uint AddCertificate(byte[] inCertificateBlob,out CimReference outCreatedCertificate)
|
|
{
|
|
AddCertificate_INPUT input = new AddCertificate_INPUT(this.XmlNamespace);
|
|
if (inCertificateBlob != null)
|
|
input.CertificateBlob=inCertificateBlob;
|
|
AddCertificate_OUTPUT output = new AddCertificate_OUTPUT();
|
|
uint returnValue = base.Invoke("AddCertificate",input,out output);
|
|
outCreatedCertificate=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("CreatedCertificate"))
|
|
outCreatedCertificate = output.CreatedCertificate;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This function adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddTrustedRootCertificate_INPUT : CimParams
|
|
{
|
|
public AddTrustedRootCertificate_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required,
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual byte[] CertificateBlob
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("CertificateBlob",Convert.ToBase64String(value));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This function adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddTrustedRootCertificate_OUTPUT : CimParams
|
|
{
|
|
public AddTrustedRootCertificate_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, Certificate encoded in X.509 format
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference CreatedCertificate
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("CreatedCertificate")[0];
|
|
CimReference epr = new CimReference("CreatedCertificate", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This function adds new root certificate to the Intel(R) AMT CertStore. A certificate cannot be removed if it is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
/// <param name="inCertificateBlob">Required, IN -</param>
|
|
/// <param name="outCreatedCertificate">OUT - Certificate encoded in X.509 format</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_NOT_PERMITTED : 16
|
|
/// PT_STATUS_MAX_LIMIT_REACHED : 23
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// PT_STATUS_DUPLICATE : 2058
|
|
/// PT_STATUS_INVALID_CERT : 2063
|
|
/// </returns>
|
|
public virtual uint AddTrustedRootCertificate(byte[] inCertificateBlob,out CimReference outCreatedCertificate)
|
|
{
|
|
AddTrustedRootCertificate_INPUT input = new AddTrustedRootCertificate_INPUT(this.XmlNamespace);
|
|
if (inCertificateBlob != null)
|
|
input.CertificateBlob=inCertificateBlob;
|
|
AddTrustedRootCertificate_OUTPUT output = new AddTrustedRootCertificate_OUTPUT();
|
|
uint returnValue = base.Invoke("AddTrustedRootCertificate",input,out output);
|
|
outCreatedCertificate=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("CreatedCertificate"))
|
|
outCreatedCertificate = output.CreatedCertificate;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddKey_INPUT : CimParams
|
|
{
|
|
public AddKey_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, RSA Key encoded as DES PKCS#1
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual byte[] KeyBlob
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("KeyBlob",Convert.ToBase64String(value));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class AddKey_OUTPUT : CimParams
|
|
{
|
|
public AddKey_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional,
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference CreatedKey
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("CreatedKey")[0];
|
|
CimReference epr = new CimReference("CreatedKey", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This function adds new certificate key to the Intel(R) AMT CertStore. A key cannot be removed if its corresponding certificate is referenced (for example, used by TLS, 802.1X or EAC).
|
|
/// </summary>
|
|
/// <param name="inKeyBlob">Required, IN -RSA Key encoded as DES PKCS#1</param>
|
|
/// <param name="outCreatedKey">OUT - </param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_MAX_LIMIT_REACHED : 23
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// PT_STATUS_DUPLICATE : 2058
|
|
/// PT_STATUS_INVALID_KEY : 2062
|
|
/// </returns>
|
|
public virtual uint AddKey(byte[] inKeyBlob,out CimReference outCreatedKey)
|
|
{
|
|
AddKey_INPUT input = new AddKey_INPUT(this.XmlNamespace);
|
|
if (inKeyBlob != null)
|
|
input.KeyBlob=inKeyBlob;
|
|
AddKey_OUTPUT output = new AddKey_OUTPUT();
|
|
uint returnValue = base.Invoke("AddKey",input,out output);
|
|
outCreatedKey=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("CreatedKey"))
|
|
outCreatedKey = output.CreatedKey;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This API is used to create a PKCS#10 certificate signing request based on a key from the key store.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class GeneratePKCS10RequestEx_INPUT : CimParams
|
|
{
|
|
public GeneratePKCS10RequestEx_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, An EPR to a key pair.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference KeyPair
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("KeyPair",value.Serialize(false));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The signing algorithm that the FW should use for signing the certificate request
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual uint SigningAlgorithm
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("SigningAlgorithm",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, A binary representation of the null-signed PKCS#10 request.the request must include a valid PKCS10RequestInfo, that will be signed by AMT FW. The Public Key specified in the request must match the public key of the referenced KeyPair parameter.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual byte[] NullSignedCertificateRequest
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("NullSignedCertificateRequest",Convert.ToBase64String(value));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This API is used to create a PKCS#10 certificate signing request based on a key from the key store.
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class GeneratePKCS10RequestEx_OUTPUT : CimParams
|
|
{
|
|
public GeneratePKCS10RequestEx_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, A binary representation of the PKCS#10 request, signed by FW.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual byte[] SignedCertificateRequest
|
|
{
|
|
get
|
|
{
|
|
return Convert.FromBase64String(this.GetField("SignedCertificateRequest")[0]); }
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This API is used to create a PKCS#10 certificate signing request based on a key from the key store.
|
|
/// </summary>
|
|
/// <param name="inKeyPair">Required, IN -An EPR to a key pair.</param>
|
|
/// <param name="inSigningAlgorithm">Required, IN -The signing algorithm that the FW should use for signing the certificate request</param>
|
|
/// <param name="inNullSignedCertificateRequest">Required, IN -A binary representation of the null-signed PKCS#10 request.the request must include a valid PKCS10RequestInfo, that will be signed by AMT FW. The Public Key specified in the request must match the public key of the referenced KeyPair parameter. </param>
|
|
/// <param name="outSignedCertificateRequest">OUT - A binary representation of the PKCS#10 request, signed by FW.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_UNSUPPORTED : 2066
|
|
/// </returns>
|
|
public virtual uint GeneratePKCS10RequestEx(CimReference inKeyPair,uint? inSigningAlgorithm,byte[] inNullSignedCertificateRequest,out byte[] outSignedCertificateRequest)
|
|
{
|
|
GeneratePKCS10RequestEx_INPUT input = new GeneratePKCS10RequestEx_INPUT(this.XmlNamespace);
|
|
if (inKeyPair != null)
|
|
input.KeyPair=inKeyPair;
|
|
if (inSigningAlgorithm.HasValue)
|
|
input.SigningAlgorithm=inSigningAlgorithm.Value;
|
|
if (inNullSignedCertificateRequest != null)
|
|
input.NullSignedCertificateRequest=inNullSignedCertificateRequest;
|
|
GeneratePKCS10RequestEx_OUTPUT output = new GeneratePKCS10RequestEx_OUTPUT();
|
|
uint returnValue = base.Invoke("GeneratePKCS10RequestEx",input,out output);
|
|
outSignedCertificateRequest=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("SignedCertificateRequest"))
|
|
outSignedCertificateRequest = output.SignedCertificateRequest;
|
|
}
|
|
return returnValue;
|
|
}
|
|
/// <summary>
|
|
///This API is used to generate a key in the FW
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class GenerateKeyPair_INPUT : CimParams
|
|
{
|
|
public GenerateKeyPair_INPUT(string ns) : base(ns)
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Required, The algorithm of the generated key.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual uint KeyAlgorithm
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("KeyAlgorithm",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// Required, The length of the generatd key in bits.
|
|
/// </summary>
|
|
[CimField(false,true)]
|
|
public virtual uint KeyLength
|
|
{
|
|
set
|
|
{
|
|
this.SetOrAddField("KeyLength",value.ToString(CultureInfo.InvariantCulture));
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This API is used to generate a key in the FW
|
|
/// </summary>
|
|
[System.SerializableAttribute()]
|
|
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType=true)]
|
|
[System.Xml.Serialization.XmlRootAttribute(Namespace="http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", IsNullable=false)]
|
|
private class GenerateKeyPair_OUTPUT : CimParams
|
|
{
|
|
public GenerateKeyPair_OUTPUT() : base("")
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// Optional, An EPR to a key pair.
|
|
/// </summary>
|
|
[CimField(false,false)]
|
|
public virtual CimReference KeyPair
|
|
{
|
|
get
|
|
{
|
|
string innerXML = this.GetField("KeyPair")[0];
|
|
CimReference epr = new CimReference("KeyPair", "http://intel.com/wbem/wscim/1/amt-schema/1/AMT_PublicKeyManagementService", innerXML);
|
|
return epr;
|
|
}
|
|
}
|
|
}
|
|
/// <summary>
|
|
///This API is used to generate a key in the FW
|
|
/// </summary>
|
|
/// <param name="inKeyAlgorithm">Required, IN -The algorithm of the generated key.</param>
|
|
/// <param name="inKeyLength">Required, IN -The length of the generatd key in bits.</param>
|
|
/// <param name="outKeyPair">OUT - An EPR to a key pair.</param>
|
|
/// <returns>
|
|
/// Legal values:
|
|
/// PT_STATUS_SUCCESS : 0
|
|
/// PT_STATUS_INTERNAL_ERROR : 1
|
|
/// PT_STATUS_MAX_LIMIT_REACHED : 23
|
|
/// PT_STATUS_INVALID_PARAMETER : 36
|
|
/// PT_STATUS_FLASH_WRITE_LIMIT_EXCEEDED : 38
|
|
/// PT_STATUS_UNSUPPORTED : 2066
|
|
/// PT_STATUS_OPERATION_IN_PROGRESS : 2082
|
|
/// </returns>
|
|
public virtual uint GenerateKeyPair(uint? inKeyAlgorithm,uint? inKeyLength,out CimReference outKeyPair)
|
|
{
|
|
GenerateKeyPair_INPUT input = new GenerateKeyPair_INPUT(this.XmlNamespace);
|
|
if (inKeyAlgorithm.HasValue)
|
|
input.KeyAlgorithm=inKeyAlgorithm.Value;
|
|
if (inKeyLength.HasValue)
|
|
input.KeyLength=inKeyLength.Value;
|
|
GenerateKeyPair_OUTPUT output = new GenerateKeyPair_OUTPUT();
|
|
uint returnValue = base.Invoke("GenerateKeyPair",input,out output);
|
|
outKeyPair=null;
|
|
if (returnValue == 0)
|
|
{
|
|
if (output.ContainsField("KeyPair"))
|
|
outKeyPair = output.KeyPair;
|
|
}
|
|
return returnValue;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_PublicKeyManagementService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <param name="cimKeys">Keys for selecting the instances</param>
|
|
/// <returns>Collection of AMT_PublicKeyManagementService objects</returns>
|
|
public static new Collection<AMT_PublicKeyManagementService> Enumerate(IWSManClient client, CimBase.CimKeys cimKeys)
|
|
{
|
|
List<AMT_PublicKeyManagementService> ret = CimBase.Enumerate<AMT_PublicKeyManagementService>(client, cimKeys);
|
|
return new Collection<AMT_PublicKeyManagementService>(ret);
|
|
}
|
|
|
|
/// <summary>
|
|
/// Enumerate instances of AMT_PublicKeyManagementService class at an endpoint.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
/// <returns>Collection of AMT_PublicKeyManagementService objects</returns>
|
|
public static new Collection<AMT_PublicKeyManagementService> Enumerate(IWSManClient client)
|
|
{
|
|
List<AMT_PublicKeyManagementService> ret = CimBase.Enumerate<AMT_PublicKeyManagementService>(client);
|
|
return new Collection<AMT_PublicKeyManagementService>(ret);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Delete the instance of AMT_PublicKeyManagementService if it is singular.
|
|
/// Note: This method will succeed only if a single instance of the class exists.
|
|
/// </summary>
|
|
/// <param name="client">WS-Management client</param>
|
|
public static new void Delete(IWSManClient client)
|
|
{
|
|
CimBase.Delete<AMT_PublicKeyManagementService>(client);
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// Represents the keys of the AMT_PublicKeyManagementService class.
|
|
/// </summary>
|
|
|
|
public new class CimKeys : CIM_CredentialManagementService.CimKeys
|
|
{
|
|
}
|
|
|
|
}
|
|
}
|
|
|