SecureDeviceAssociationTemplate.InstallCertificateAsync Method

Associations cannot be created by the template until this operation has completed successfully at least once.

InstallCertificateAsync is not used to provision trust of the remote server certificate; that is accomplished out-of-band.

The certificate content should be in Distinguished Encoding Rules (DER) binary X.509 format (e.g., a public .cer file) and it should be the result of a previous request created using CreateCertificateRequestAsync. The subject name must match, the private key corresponding to the public key in the certificate must exist, and the certificate must chain up to a root trusted by the console. (The buffer returned by CreateCertificateRequestAsync contains the proper certificate, in the proper format.)

Syntax

public:
IAsyncAction^ InstallCertificateAsync(
         IBuffer^ certificateBuffer
)  

Parameters

certificateBuffer
Type: IBuffer 

A buffer containing the certificate to be installed.

Return value

Type: IAsyncAction 

Returns an IAsyncAction object that represents the state of the asynchronous operation. Completion of the asynchronous operation is signaled by using a handler that is passed to the IAsyncAction.Completed property.

Remarks

The certificate buffer may instead be a PKCS #12 archive that includes a private key to use (e.g., a .pfx file with no password). This is strongly discouraged outside of prototyping usage, since storing and/or transmitting the private key introduces threat surface and considerably reduces the value of the identity claimed by the certificate. In the future, NSAL configuration will be required in order to allow private key installation.

The Certificate Authority (CA) certificate used to issue/sign the console IPsec certificate and its own issuer chain must be trusted. Similarly the server certificate chain used by the remote IPsec endpoint must be trusted. In the future, this will be enabled by an XDP ingestion process. In the current release, developers must use the CertMgr.exe tool distributed with the XDK to install certificates on the devkit.

This method cannot be invoked on Secure Device Association Templates that do not have a relying party declared in the network manifest.

This method may be invoked more than once to replace the certificate—before it expires, for example. Installation is somewhat expensive and should be infrequent, but note that titles are expected to use certificate lifetimes no longer than that of the XSTS token used to authorize the certificate’s creation. Titles are currently required to manage this certificate lifetime themselves and request/issue a new certificate when appropriate.

Requirements

Namespace: Windows.Xbox.Networking

Metadata: windows.winmd

See also

Reference

SecureDeviceAssociationTemplate Class

SecureDeviceAssociationTemplate Members

Windows.Xbox.Networking Namespace