Class MAMCertificatePinningManager
-
- All Implemented Interfaces:
public final class MAMCertificatePinningManagerThe MAMCertificatePinningManager has methods to enable certificate pinning for apps, according to the Intune cert pinning configuration received from the MAM Service.
-
-
Method Summary
Modifier and Type Method Description static SSLSocketFactorygetPinningSocketFactory(@Nullable() String identity, @NonNull() URL url)Get a SSLSocketFactory used to configure HTTPS connection objects. static SSLSocketFactorygetPinningSocketFactoryForOID(@Nullable() String oid, @NonNull() URL url)Get a SSLSocketFactory used to configure HTTPS connection objects. static SSLContextgetPinningSSLContext(@Nullable() String identity, @NonNull() URL url)Get a SSLContext that can be used with a custom SSLSocketFactory implementation. static SSLContextgetPinningSSLContextForOID(@Nullable() String oid, @NonNull() URL url)Get a SSLContext that can be used with a custom SSLSocketFactory implementation. static voidvalidatePins(@NonNull() Array<X509Certificate> chain, @Nullable() String identity, @NonNull() URL url)Validate the given chain using the pinning configuration for the given identity and URL. static voidvalidatePinsForOID(@NonNull() Array<X509Certificate> chain, @Nullable() String oid, @NonNull() URL url)Validate the given chain using the pinning configuration for the given identity and URL. -
-
Method Detail
-
getPinningSocketFactory
@Deprecated()@NonNull() static SSLSocketFactory getPinningSocketFactory(@Nullable() String identity, @NonNull() URL url)
Get a SSLSocketFactory used to configure HTTPS connection objects.
- Parameters:
identity- UPN of the identity of the account using the connection.url- The URL to be connected, used to choose the correct pins.- Returns:
a SSLSocketFactory instance configured for pinning.
-
getPinningSocketFactoryForOID
@NonNull() static SSLSocketFactory getPinningSocketFactoryForOID(@Nullable() String oid, @NonNull() URL url)
Get a SSLSocketFactory used to configure HTTPS connection objects.
- Parameters:
oid- AAD OID of the identity of the account using the connection.url- The URL to be connected, used to choose the correct pins.- Returns:
a SSLSocketFactory instance configured for pinning.
-
getPinningSSLContext
@Deprecated()@NonNull() static SSLContext getPinningSSLContext(@Nullable() String identity, @NonNull() URL url)
Get a SSLContext that can be used with a custom SSLSocketFactory implementation.
- Parameters:
identity- UPN of the identity of the account using the connection.url- The URL to be connected, used to choose the correct pins.- Returns:
a SSLContext instance configured for pinning.
-
getPinningSSLContextForOID
@NonNull() static SSLContext getPinningSSLContextForOID(@Nullable() String oid, @NonNull() URL url)
Get a SSLContext that can be used with a custom SSLSocketFactory implementation.
- Parameters:
oid- AAD OID of the identity of the account using the connection.url- The URL to be connected, used to choose the correct pins.- Returns:
a SSLContext instance configured for pinning.
-
validatePins
@Deprecated() static void validatePins(@NonNull() Array<X509Certificate> chain, @Nullable() String identity, @NonNull() URL url)
Validate the given chain using the pinning configuration for the given identity and URL.
- Parameters:
chain- The chain to validate.identity- UPN of the identity of the account using the connection.url- The URL to be connected, used to choose the correct pins.
-
validatePinsForOID
static void validatePinsForOID(@NonNull() Array<X509Certificate> chain, @Nullable() String oid, @NonNull() URL url)
Validate the given chain using the pinning configuration for the given identity and URL.
- Parameters:
chain- The chain to validate.oid- AAD OID of the identity of the account using the connection.url- The URL to be connected, used to choose the correct pins.
-
-
-
-