IotHubX509HardwareAuthenticationProvider Class

public class IotHubX509HardwareAuthenticationProvider
extends IotHubAuthenticationProvider

Field Summary

Modifier and Type Field and Description
protected SecurityProviderX509 securityProviderX509

Constructor Summary

Constructor Description
IotHubX509HardwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, SecurityProvider securityProvider)

Method Summary

Modifier and Type Method and Description
javax.net.ssl.SSLContext getSSLContext()

Getter for IotHubSSLContext

void setIotHubTrustedCert(String certificate)

Setter for the user trusted certificate

void setPathToIotHubTrustedCert(String pathToCertificate)

Setter for the providing trusted certificate.

Methods inherited from IotHubAuthenticationProvider

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

securityProviderX509

protected SecurityProviderX509 securityProviderX509

Constructor Details

IotHubX509HardwareAuthenticationProvider

public IotHubX509HardwareAuthenticationProvider(String hostname, String gatewayHostname, String deviceId, String moduleId, SecurityProvider securityProvider)

Parameters:

hostname
gatewayHostname
deviceId
moduleId
securityProvider

Method Details

getSSLContext

public SSLContext getSSLContext()

Getter for IotHubSSLContext

Overrides:

IotHubX509HardwareAuthenticationProvider.getSSLContext()

Returns:

The value of IotHubSSLContext

Throws:

java.io.IOException - if an error occurs when generating the SSLContext

setIotHubTrustedCert

public void setIotHubTrustedCert(String certificate)

Setter for the user trusted certificate

Overrides:

IotHubX509HardwareAuthenticationProvider.setIotHubTrustedCert(String certificate)

Parameters:

certificate - valid user trusted certificate string

setPathToIotHubTrustedCert

public void setPathToIotHubTrustedCert(String pathToCertificate)

Setter for the providing trusted certificate.

Overrides:

IotHubX509HardwareAuthenticationProvider.setPathToIotHubTrustedCert(String pathToCertificate)

Parameters:

pathToCertificate - path to the certificate for one way authentication.

Applies to