Skip to content

Commit

Permalink
feat: support get certificates api (#336)
Browse files Browse the repository at this point in the history
Co-authored-by: madhavilosetty-intel <[email protected]>
  • Loading branch information
rjbrache and madhavilosetty-intel authored Jun 3, 2024
1 parent 0762fba commit 66b61b9
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 29 deletions.
26 changes: 23 additions & 3 deletions pkg/wsman/amt/publickey/certificate.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,43 @@ func (certificate Certificate) Enumerate() (response Response, err error) {

// Pull returns the instances of this class. An enumeration context provided by the Enumerate call is used as input.
func (certificate Certificate) Pull(enumerationContext string) (response Response, err error) {
var refinedOutput []RefinedPublicKeyCertificateResponse

response = Response{
Message: &client.Message{
XMLInput: certificate.base.Pull(enumerationContext),
},
}

// send the message to AMT
err = certificate.base.Execute(response.Message)
if err != nil {
return
return response, err
}

// put the xml response into the go struct
err = xml.Unmarshal([]byte(response.XMLOutput), &response)
if err != nil {
return
return response, err
}

return
for _, item := range response.Body.PullResponse.PublicKeyCertificateItems {
output := RefinedPublicKeyCertificateResponse{
InstanceID: item.InstanceID,
X509Certificate: item.X509Certificate,
ElementName: item.ElementName,
TrustedRootCertificate: item.TrustedRootCertificate,
Issuer: item.Issuer,
Subject: item.Subject,
ReadOnlyCertificate: item.ReadOnlyCertificate,
}

refinedOutput = append(refinedOutput, output)
}

response.Body.RefinedPullResponse.PublicKeyCertificateItems = refinedOutput

return response, err
}

// Put will change properties of the selected instance.
Expand Down
38 changes: 36 additions & 2 deletions pkg/wsman/amt/publickey/certificate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestJson(t *testing.T) {
AddCertificate_OUTPUT: AddCertificate_OUTPUT{},
},
}
expectedResult := "{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"AddTrustedRootCertificate_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreatedCertificate\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"AddCertificate_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreatedCertificate\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"AddKey_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreatedKey\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"GenerateKeyPair_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"KeyPair\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"GeneratePKCS10RequestEx_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"SignedCertificateRequest\":\"\",\"ReturnValue\":0},\"KeyManagementGetResponse\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreationClassName\":\"\",\"ElementName\":\"\",\"EnabledDefault\":0,\"EnabledState\":0,\"Name\":\"\",\"OperationalStatus\":null,\"RequestedState\":0,\"SystemCreationClassName\":\"\",\"SystemName\":\"\"},\"PublicKeyCertificateGetAndPutResponse\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ElementName\":\"\",\"InstanceID\":\"\",\"X509Certificate\":\"\",\"TrustedRootCertificate\":false,\"Issuer\":\"\",\"Subject\":\"\",\"ReadOnlyCertificate\":false},\"EnumerateResponse\":{\"EnumerationContext\":\"\"},\"PullResponse\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"KeyManagementItems\":null,\"PublicKeyCertificateItems\":null}}"
expectedResult := "{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"AddTrustedRootCertificate_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreatedCertificate\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"AddCertificate_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreatedCertificate\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"AddKey_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreatedKey\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"GenerateKeyPair_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"KeyPair\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Address\":\"\",\"ReferenceParameters\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ResourceURI\":\"\",\"SelectorSet\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"Selectors\":null}}},\"ReturnValue\":0},\"GeneratePKCS10RequestEx_OUTPUT\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"SignedCertificateRequest\":\"\",\"ReturnValue\":0},\"KeyManagementGetResponse\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"CreationClassName\":\"\",\"ElementName\":\"\",\"EnabledDefault\":0,\"EnabledState\":0,\"Name\":\"\",\"OperationalStatus\":null,\"RequestedState\":0,\"SystemCreationClassName\":\"\",\"SystemName\":\"\"},\"PublicKeyCertificateGetAndPutResponse\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"ElementName\":\"\",\"InstanceID\":\"\",\"X509Certificate\":\"\",\"TrustedRootCertificate\":false,\"Issuer\":\"\",\"Subject\":\"\",\"ReadOnlyCertificate\":false},\"EnumerateResponse\":{\"EnumerationContext\":\"\"},\"PullResponse\":{\"XMLName\":{\"Space\":\"\",\"Local\":\"\"},\"KeyManagementItems\":null,\"PublicKeyCertificateItems\":null},\"RefinedPullResponse\":{}}"
result := response.JSON()
assert.Equal(t, expectedResult, result)
}
Expand All @@ -37,7 +37,7 @@ func TestYaml(t *testing.T) {
AddCertificate_OUTPUT: AddCertificate_OUTPUT{},
},
}
expectedResult := "xmlname:\n space: \"\"\n local: \"\"\naddtrustedrootcertificate_output:\n xmlname:\n space: \"\"\n local: \"\"\n createdcertificate:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\naddcertificate_output:\n xmlname:\n space: \"\"\n local: \"\"\n createdcertificate:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\naddkey_output:\n xmlname:\n space: \"\"\n local: \"\"\n createdkey:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\ngeneratekeypair_output:\n xmlname:\n space: \"\"\n local: \"\"\n keypair:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\ngeneratepkcs10requestex_output:\n xmlname:\n space: \"\"\n local: \"\"\n signedcertificaterequest: \"\"\n returnvalue: 0\nkeymanagementgetresponse:\n xmlname:\n space: \"\"\n local: \"\"\n creationclassname: \"\"\n elementname: \"\"\n enableddefault: 0\n enabledstate: 0\n name: \"\"\n operationalstatus: []\n requestedstate: 0\n systemcreationclassname: \"\"\n systemname: \"\"\npublickeycertificategetandputresponse:\n xmlname:\n space: \"\"\n local: \"\"\n elementname: \"\"\n instanceid: \"\"\n x509certificate: \"\"\n trustedrootcertificate: false\n issuer: \"\"\n subject: \"\"\n readonlycertificate: false\nenumerateresponse:\n enumerationcontext: \"\"\npullresponse:\n xmlname:\n space: \"\"\n local: \"\"\n keymanagementitems: []\n publickeycertificateitems: []\n"
expectedResult := "xmlname:\n space: \"\"\n local: \"\"\naddtrustedrootcertificate_output:\n xmlname:\n space: \"\"\n local: \"\"\n createdcertificate:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\naddcertificate_output:\n xmlname:\n space: \"\"\n local: \"\"\n createdcertificate:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\naddkey_output:\n xmlname:\n space: \"\"\n local: \"\"\n createdkey:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\ngeneratekeypair_output:\n xmlname:\n space: \"\"\n local: \"\"\n keypair:\n xmlname:\n space: \"\"\n local: \"\"\n address: \"\"\n referenceparameters:\n xmlname:\n space: \"\"\n local: \"\"\n resourceuri: \"\"\n selectorset:\n xmlname:\n space: \"\"\n local: \"\"\n selectors: []\n returnvalue: 0\ngeneratepkcs10requestex_output:\n xmlname:\n space: \"\"\n local: \"\"\n signedcertificaterequest: \"\"\n returnvalue: 0\nkeymanagementgetresponse:\n xmlname:\n space: \"\"\n local: \"\"\n creationclassname: \"\"\n elementname: \"\"\n enableddefault: 0\n enabledstate: 0\n name: \"\"\n operationalstatus: []\n requestedstate: 0\n systemcreationclassname: \"\"\n systemname: \"\"\npublickeycertificategetandputresponse:\n xmlname:\n space: \"\"\n local: \"\"\n elementname: \"\"\n instanceid: \"\"\n x509certificate: \"\"\n trustedrootcertificate: false\n issuer: \"\"\n subject: \"\"\n readonlycertificate: false\nenumerateresponse:\n enumerationcontext: \"\"\npullresponse:\n xmlname:\n space: \"\"\n local: \"\"\n keymanagementitems: []\n publickeycertificateitems: []\nrefinedpullresponse:\n keymanagementitems: []\n publickeycertificateitems: []\n"
result := response.YAML()
assert.Equal(t, expectedResult, result)
}
Expand Down Expand Up @@ -154,6 +154,40 @@ func TestPositiveAMT_PublicKeyCertificate(t *testing.T) {
},
},
},
RefinedPullResponse: RefinedPullResponse{
PublicKeyCertificateItems: []RefinedPublicKeyCertificateResponse{
{
ElementName: "Intel(r) AMT Certificate",
InstanceID: "Intel(r) AMT Certificate: Handle: 0",
Issuer: "C=unknown,O=unknown,CN=MPSRoot-0af1d5",
Subject: "C=unknown,O=unknown,CN=MPSRoot-0af1d5",
TrustedRootCertificate: true,
X509Certificate: X509TestCertificate,
PublicKeyHandle: "",
AssociatedProfiles: nil,
},
{
ElementName: "Intel(r) AMT Certificate",
InstanceID: "Intel(r) AMT Certificate: Handle: 1",
Issuer: "C=unknown,O=unknown,CN=MPSRoot-0af1d5",
Subject: "C=unknown,O=unknown,CN=MPSRoot-0af1d5",
TrustedRootCertificate: false,
X509Certificate: "MIIEOzCCAqOgAwIBAgIDAZMjMA0GCSqGSIb3DQEBDAUAMD0xFzAVBgNVBAMTDk1QU1Jvb3QtMGFmMWQ1MRAwDgYDVQQKEwd1bmtub3duMRAwDgYDVQQGEwd1bmtub3duMCAXDTIyMDkyNDEwNDUwOFoYDzIwNTMwOTI0MTA0NTA4WjA9MRcwFQYDVQQDEw5NUFNSb290LTBhZjFkNTEQMA4GA1UEChMHdW5rbm93bjEQMA4GA1UEBhMHdW5rbm93bjCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBALz/oJNyWXlClSlteAieC8Uyd4A+tbn8b45k6LKiImhDmdz/xFo9xe0C9GNf7b42KVpg5WoH/sPhoClR9Tv5i1LnilT1SUir42fcm2NEV9dRcLsPd/RAQfz8u0D4zb3blnxE8isqzriNpG7kac35UidSr5ym8TZ3IwXx6JJuncGgfB0DFZADC/+dA74n3coykvWBYqLr6RI5pkAxvulkRlCsatJTJrvMUYJ51GI28jV56mIAc89sLrHqiSKCZBH9AcUrnZ/cB6ST/IikXpxy5wXBIvWT3VKVq75T/uIoCBEp5TLEn1EOYGqBBOCSQgmtmX7eVaB0s1+ppPW9w9a2zS45cHAtQ7tYvkkPv2dRhSzZdlk6HRXDP5wsF0aiflZCgbrjkq0SFC4e3Lo7XQX3FTNb0SOTZVTydupoMKkgJQTNlcosdu1ZzaIBl3eSkKkJZz2rUTssZC5tn9vcDd5vy3BzcGh5pvkgfAgN1sydqG7Ke1qCkNEzm11B/BsevatjjwIDAQABo0IwQDAMBgNVHRMEBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIABzAdBgNVHQ4EFgQUCvHVQqerCid99eLApuLky9x6H5owDQYJKoZIhvcNAQEMBQADggGBAIzOyGV0hzsmH2biJlzwTZaHMxqS7boTFMkHw+KvzsI201tHqVmCoiQ8EHErBGLSoDOTDRgOUGOCA5XU5ie9OWupAGqKBSwIyAhmJMOzrzC4Gwpu8K1msoFJH30kx/V9purpbS3BRj0xfYXLa6IczbTg3E5IfTnZRJ9YuUtKQfI0P9c5U9CoKtddKn4+lRvOjFDoYfQGCJ7go3xjNCcGCVCjfkUhAVdbQ21DCRr6/YCZDWmjzZpL0p7UKF8roTiNuL/Z7gIXxch5HOmEWHY9uQ6K2MntuxAu0aK/mSD2kwmt/ECongdEGfUvhULLoPRQlQ2LnzcUQEgMECGQR5Yfy9jT0E8zdWDpc2tgVioNu6rEYKgp/GhG+sv7jv58pW82FRAV9xXtftW9+XDugC8tBJ6JHn0Q2v0QAflD2CEQVhWAY8bAqrbfTGUsaLfGL6kxV/qqssoMgLR8Whq96T5le/4XGhQpbCHWIlctD6MwbrsunIAeQKp1Sc3DosY7DLq1MQ==",
PublicKeyHandle: "",
AssociatedProfiles: nil,
},
{
ElementName: "Intel(r) AMT Certificate",
InstanceID: "Intel(r) AMT Certificate: Handle: 2",
Issuer: "C=unknown,O=unknown,CN=MPSRoot-0af1d5",
Subject: "C=unknown,O=unknown,CN=MPSRoot-0af1d5",
TrustedRootCertificate: true,
X509Certificate: "MIIEOzCCAqOgAwIBAgIDAZMjMA0GCSqGSIb3DQEBDAUAMD0xFzAVBgNVBAMTDk1QU1Jvb3QtMGFmMWQ1MRAwDgYDVQQKEwd1bmtub3duMRAwDgYDVQQGEwd1bmtub3duMCAXDTIyMDkyNDEwNDUwOFoYDzIwNTMwOTI0MTA0NTA4WjA9MRcwFQYDVQQDEw5NUFNSb290LTBhZjFkNTEQMA4GA1UEChMHdW5rbm93bjEQMA4GA1UEBhMHdW5rbm93bjCCAaIwDQYJKoZIhvcNAQEBBQADggGPADCCAYoCggGBALz/oJNyWXlClSlteAieC8Uyd4A+tbn8b45k6LKiImhDmdz/xFo9xe0C9GNf7b42KVpg5WoH/sPhoClR9Tv5i1LnilT1SUir42fcm2NEV9dRcLsPd/RAQfz8u0D4zb3blnxE8isqzriNpG7kac35UidSr5ym8TZ3IwXx6JJuncGgfB0DFBADC/+dA74n3coykvWBYqLr6RI5pkAxvulkRlCsatJTJrvMUYJ51GI28jV56mIAc89sLrHqiSKCZBH9AcUrnZ/cB6ST/IikXpxy5wXBIvWT3VKVq75T/uIoCBEp5TLEn1EOYGqBBOCSQgmtmX7eVaB0s1+ppPW9w9a2zS45cHAtQ7tYvkkPv2dRhSzZdlk6HRXDP5wsF0aiflZCgbrjkq0SFC4e3Lo7XQX3FTNb0SOTZVTydupoMKkgJQTNlcosdu1ZzaIBl3eSkKkJZz2rUTssZC5tn9vcDd5vy3BzcGh5pvkgfAgN1sydqG7Ke1qCkNEzm11B/BsevatjjwIDAQABo0IwQDAMBgNVHRMEBTADAQH/MBEGCWCGSAGG+EIBAQQEAwIABzAdBgNVHQ4EFgQUCvHVQqerCid99eLApuLky9x6H5owDQYJKoZIhvcNAQEMBQADggGBAIzOyGV0hzsmH2biJlzwTZaHMxqS7boTFMkHw+KvzsI201tHqVmCoiQ8EHErBGLSoDOTDRgOUGOCA5XU5ie9OWupAGqKBSwIyAhmJMOzrzC4Gwpu8K1msoFJH30kx/V9purpbS3BRj0xfYXLa6IczbTg3E5IfTnZRJ9YuUtKQfI0P9c5U9CoKtddKn4+lRvOjFDoYfQGCJ7go3xjNCcGCVCjfkUhAVdbQ21DCRr6/YCZDWmjzZpL0p7UKF8roTiNuL/Z7gIXxch5HOmEWHY9uQ6K2MntuxAu0aK/mSD2kwmt/ECongdEGfUvhULLoPRQlQ2LnzcUQEgMECGQR5Yfy9jT0E8zdWDpc2tgVioNu6rEYKgp/GhG+sv7jv58pW82FRAV9xXtftW9+XDugC8tBJ6JHn0Q2v0QAflD2CEQVhWAY8bAqrbfTGUsaLfGL6kxV/qqssoMgLR8Whq96T5le/4XGhQpbCHWIlctD6MwbrsunIAeQKp1Sc3DosY7DLq1MQ==",
PublicKeyHandle: "",
AssociatedProfiles: nil,
},
},
},
},
},

Expand Down
28 changes: 28 additions & 0 deletions pkg/wsman/amt/publickey/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ type (
PublicKeyCertificateGetAndPutResponse PublicKeyCertificateResponse `xml:"AMT_PublicKeyCertificate,omitempty"`
EnumerateResponse common.EnumerateResponse
PullResponse PullResponse
RefinedPullResponse RefinedPullResponse
}
RefinedPullResponse struct {
KeyManagementItems []RefinedKeyManagementResponse `json:"KeyManagementItems,omitempty"`
PublicKeyCertificateItems []RefinedPublicKeyCertificateResponse `json:"PublicKeyCertificateItems,omitempty"`
}
PullResponse struct {
XMLName xml.Name `xml:"PullResponse,omitempty"`
Expand All @@ -59,6 +64,17 @@ type (
SystemCreationClassName string `xml:"SystemCreationClassName,omitempty"` // The CreationClassName of the scoping System.
SystemName string `xml:"SystemName,omitempty"` // The Name of the scoping System.
}
RefinedKeyManagementResponse struct {
CreationClassName string
ElementName string
EnabledDefault EnabledDefault
EnabledState EnabledState
Name string
RequestedState RequestedState
SystemCreationClassName string
SystemName string
}

PublicKeyCertificateResponse struct {
XMLName xml.Name `xml:"AMT_PublicKeyCertificate,omitempty"`
ElementName string `xml:"ElementName,omitempty"` // A user-friendly name for the object . . .
Expand All @@ -69,6 +85,18 @@ type (
Subject string `xml:"Subject,omitempty"` // The Subject field of this certificate.
ReadOnlyCertificate bool `xml:"ReadOnlyCertificate"` // Indicates whether the certificate is an Intel AMT self-signed certificate. If True, the certificate cannot be deleted.
}

RefinedPublicKeyCertificateResponse struct {
ElementName string `json:"ElementName,omitempty"` // A user-friendly name for the object . . .
InstanceID string `json:"InstanceID,omitempty"` // Within the scope of the instantiating Namespace, InstanceID opaquely and uniquely identifies an instance of this class.
X509Certificate string `json:"X509Certificate,omitempty"` // uint8[4100] // The X.509 Certificate blob.
TrustedRootCertificate bool `json:"TrustedRootCertficate"` // For root certificate [that were added by AMT_PublicKeyManagementService.AddTrustedRootCertificate()]this property will be true. FYI Certificate is spelled wrong comimg from AMT.
Issuer string `json:"Issuer,omitempty"` // The Issuer field of this certificate.
Subject string `json:"Subject,omitempty"` // The Subject field of this certificate.
ReadOnlyCertificate bool `json:"ReadOnlyCertificate"` // Indicates whether the certificate is an Intel AMT self-signed certificate. If True, the certificate cannot be deleted.
PublicKeyHandle string `json:"PublicKeyHandle,omitempty"`
AssociatedProfiles []string `json:"AssociatedProfiles,omitempty"`
}
AddTrustedRootCertificate_OUTPUT struct {
XMLName xml.Name `xml:"AddTrustedRootCertificate_OUTPUT"`
CreatedCertificate CreatedCertificateResponse `xml:"CreatedCertificate,omitempty"`
Expand Down
Loading

0 comments on commit 66b61b9

Please sign in to comment.