Class MAMCertificatePinningManager

  • All Implemented Interfaces:

    
    public final class MAMCertificatePinningManager
    
                        

    The MAMCertificatePinningManager has methods to enable certificate pinning for apps, according to the Intune cert pinning configuration received from the MAM Service.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • 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.