SecurityProvider Class

  • java.lang.Object
    • com.microsoft.azure.sdk.iot.provisioning.security.SecurityProvider

public class SecurityProvider

Method Summary

Modifier and Type Method and Description
abstract String getRegistrationId()

Unique id required for registration

SSLContext getSSLContext()

Retrieves the SSL context loaded with trusted certs. This default implementation loads the trusted certificates from your device's trusted root certification authorities certificate store. Implementations of SecurityProviderX509 must override this function so that it returns an SSLContext instance with the required private key and public certificates loaded into it as well as the default trusted certificates saved in your device's trusted root certification authorities certificate store.

Method Details

getRegistrationId

public abstract String getRegistrationId()

Unique id required for registration

Returns:

Returns the registration Id used needed for the service

Throws:

SecurityProviderException - If registration id with the underlying implementation could not be retrieved

getSSLContext

public SSLContext getSSLContext()

Retrieves the SSL context loaded with trusted certs. This default implementation loads the trusted certificates from your device's trusted root certification authorities certificate store. Implementations of SecurityProviderX509 must override this function so that it returns an SSLContext instance with the required private key and public certificates loaded into it as well as the default trusted certificates saved in your device's trusted root certification authorities certificate store.

Returns:

The SSLContext instance.

Throws:

SecurityProviderException - If ssl context could not be generated for any of the reason.

Applies to