Package apple.matter

Class MTRCertificates

  • All Implemented Interfaces:
    NSObject

    public class MTRCertificates
    extends NSObject
    • Constructor Detail

      • MTRCertificates

        protected MTRCertificates​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static MTRCertificates allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • convertMatterCertificate

        @Nullable
        public static @Nullable NSData convertMatterCertificate​(@NotNull
                                                                @NotNull NSData matterCertificate)
        Convert the given Matter TLV encoded certificate to the X.509v3 DER encoded format. Returns nil if the conversion fails (e.g. if the input data cannot be parsed as a Matter TLV encoded certificate, or if the certificate cannot be represented in the X.509v3 DER format). API-Since: 16.4
      • convertX509Certificate

        @Nullable
        public static @Nullable NSData convertX509Certificate​(@NotNull
                                                              @NotNull NSData x509Certificate)
        Convert the given X.509v3 DER encoded certificate to the Matter certificate format. Returns nil if the conversion fails (e.g. if the input data cannot be parsed as a DER encoded X.509 certificate, or if the certificate cannot be represented in the Matter certificate format).
      • createCertificateSigningRequestError

        @Nullable
        public static @Nullable NSData createCertificateSigningRequestError​(@NotNull
                                                                            @NotNull MTRKeypair keypair,
                                                                            @Nullable
                                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Generate a PKCS#10 certificate signing request from a MTRKeypair. This can then be used to request an operational or ICA certificate from an external certificate authority. The CSR will have the subject OU DN set to 'CSA', because omitting all identifying information altogether often trips up CSR parsing code. The CA being used should expect this and ignore the request subject, producing a subject that matches the rules for Matter certificates. On failure returns nil and if "error" is not null sets *error to the relevant error.
      • createIntermediateCertificateRootCertificateIntermediatePublicKeyIssuerIDFabricIDError

        @Nullable
        public static @Nullable NSData createIntermediateCertificateRootCertificateIntermediatePublicKeyIssuerIDFabricIDError​(@NotNull
                                                                                                                              @NotNull MTRKeypair rootKeypair,
                                                                                                                              @NotNull
                                                                                                                              @NotNull NSData rootCertificate,
                                                                                                                              @NotNull
                                                                                                                              @NotNull SecKeyRef intermediatePublicKey,
                                                                                                                              @Nullable
                                                                                                                              @Nullable NSNumber issuerID,
                                                                                                                              @Nullable
                                                                                                                              @Nullable NSNumber fabricID,
                                                                                                                              @Nullable
                                                                                                                              @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        As above, but defaults to no expiration time. API-Since: 16.4
      • createIntermediateCertificateRootCertificateIntermediatePublicKeyIssuerIDFabricIDValidityPeriodError

        @Nullable
        public static @Nullable NSData createIntermediateCertificateRootCertificateIntermediatePublicKeyIssuerIDFabricIDValidityPeriodError​(@NotNull
                                                                                                                                            @NotNull MTRKeypair rootKeypair,
                                                                                                                                            @NotNull
                                                                                                                                            @NotNull NSData rootCertificate,
                                                                                                                                            @NotNull
                                                                                                                                            @NotNull SecKeyRef intermediatePublicKey,
                                                                                                                                            @Nullable
                                                                                                                                            @Nullable NSNumber issuerID,
                                                                                                                                            @Nullable
                                                                                                                                            @Nullable NSNumber fabricID,
                                                                                                                                            @NotNull
                                                                                                                                            @NotNull NSDateInterval validityPeriod,
                                                                                                                                            @Nullable
                                                                                                                                            @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Create an intermediate X.509 DER encoded certificate that has the right fields to be a valid Matter intermediate certificate. If issuerID is not nil, it's unsignedLongLongValue will be used for the matter-icac-id attribute in the subject distinguished name of the resulting certificate. If issuerID is nil, a random value will be generated for matter-icac-id. If fabricID is not nil, it will be included in the subject DN of the certificate. In this case it must be a valid Matter fabric id. validityPeriod specifies when the certificate will be valid. A certificate with no expiration time can be created by specifying [NSDate distantFuture] for the end of the period. On failure returns nil and if "error" is not null sets *error to the relevant error. API-Since: 16.6
      • createOperationalCertificateSigningCertificateOperationalPublicKeyFabricIDNodeIDCaseAuthenticatedTagsError

        @Nullable
        public static @Nullable NSData createOperationalCertificateSigningCertificateOperationalPublicKeyFabricIDNodeIDCaseAuthenticatedTagsError​(@NotNull
                                                                                                                                                  @NotNull MTRKeypair signingKeypair,
                                                                                                                                                  @NotNull
                                                                                                                                                  @NotNull NSData signingCertificate,
                                                                                                                                                  @NotNull
                                                                                                                                                  @NotNull SecKeyRef operationalPublicKey,
                                                                                                                                                  @NotNull
                                                                                                                                                  @NotNull NSNumber fabricID,
                                                                                                                                                  @NotNull
                                                                                                                                                  @NotNull NSNumber nodeID,
                                                                                                                                                  @Nullable
                                                                                                                                                  @Nullable NSSet<? extends NSNumber> caseAuthenticatedTags,
                                                                                                                                                  @Nullable
                                                                                                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        As above, but defaults to no expiration time. API-Since: 16.4
      • createOperationalCertificateSigningCertificateOperationalPublicKeyFabricIDNodeIDCaseAuthenticatedTagsValidityPeriodError

        @Nullable
        public static @Nullable NSData createOperationalCertificateSigningCertificateOperationalPublicKeyFabricIDNodeIDCaseAuthenticatedTagsValidityPeriodError​(@NotNull
                                                                                                                                                                @NotNull MTRKeypair signingKeypair,
                                                                                                                                                                @NotNull
                                                                                                                                                                @NotNull NSData signingCertificate,
                                                                                                                                                                @NotNull
                                                                                                                                                                @NotNull SecKeyRef operationalPublicKey,
                                                                                                                                                                @NotNull
                                                                                                                                                                @NotNull NSNumber fabricID,
                                                                                                                                                                @NotNull
                                                                                                                                                                @NotNull NSNumber nodeID,
                                                                                                                                                                @Nullable
                                                                                                                                                                @Nullable NSSet<? extends NSNumber> caseAuthenticatedTags,
                                                                                                                                                                @NotNull
                                                                                                                                                                @NotNull NSDateInterval validityPeriod,
                                                                                                                                                                @Nullable
                                                                                                                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Create an X.509 DER encoded certificate that has the right fields to be a valid Matter operational certificate. signingKeypair and signingCertificate are the root or intermediate that is signing the operational certificate. nodeID and fabricID are expected to be 64-bit unsigned integers. nodeID must be a valid Matter operational node id. fabricID must be a valid Matter fabric id. caseAuthenticatedTags may be nil to indicate no CASE Authenticated Tags should be used. If caseAuthenticatedTags is not nil, it must contain at most 3 numbers, which are expected to be 32-bit unsigned Case Authenticated Tag values. validityPeriod specifies when the certificate will be valid. A certificate with no expiration time can be created by specifying [NSDate distantFuture] for the end of the period. On failure returns nil and if "error" is not null sets *error to the relevant error. API-Since: 16.6
      • createRootCertificateIssuerIDFabricIDError

        @Nullable
        public static @Nullable NSData createRootCertificateIssuerIDFabricIDError​(@NotNull
                                                                                  @NotNull MTRKeypair keypair,
                                                                                  @Nullable
                                                                                  @Nullable NSNumber issuerID,
                                                                                  @Nullable
                                                                                  @Nullable NSNumber fabricID,
                                                                                  @Nullable
                                                                                  @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        As above, but defaults to no expiration time. API-Since: 16.4
      • createRootCertificateIssuerIDFabricIDValidityPeriodError

        @Nullable
        public static @Nullable NSData createRootCertificateIssuerIDFabricIDValidityPeriodError​(@NotNull
                                                                                                @NotNull MTRKeypair keypair,
                                                                                                @Nullable
                                                                                                @Nullable NSNumber issuerID,
                                                                                                @Nullable
                                                                                                @Nullable NSNumber fabricID,
                                                                                                @NotNull
                                                                                                @NotNull NSDateInterval validityPeriod,
                                                                                                @Nullable
                                                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Create a root (self-signed) X.509 DER encoded certificate that has the right fields to be a valid Matter root certificate. If issuerID is not nil, it's unsignedLongLongValue will be used for the matter-rcac-id attribute in the subject distinguished name of the resulting certificate. If issuerID is nil, a random value will be generated for matter-rcac-id. If fabricID is not nil, it will be included in the subject DN of the certificate. In this case it must be a valid Matter fabric id. validityPeriod specifies when the certificate will be valid. Note that there is currently no mechanism available in Matter to update or rotate the root certificate of a fabric installed on a device. A certificate with no expiration time can be created by specifying [NSDate distantFuture] for the end of the period. On failure returns nil and if "error" is not null sets *error to the relevant error. API-Since: 16.6
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • generateCertificateSigningRequestError

        @Deprecated
        @Nullable
        public static @Nullable NSData generateCertificateSigningRequestError​(@NotNull
                                                                              @NotNull MTRKeypair keypair,
                                                                              @Nullable
                                                                              @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 16.1 Deprecated-Since: 16.4 Deprecated-Message: Please use createCertificateSigningRequest:error:
      • generateIntermediateCertificateRootCertificateIntermediatePublicKeyIssuerIdFabricIdError

        @Deprecated
        @Nullable
        public static @Nullable NSData generateIntermediateCertificateRootCertificateIntermediatePublicKeyIssuerIdFabricIdError​(@NotNull
                                                                                                                                @NotNull MTRKeypair rootKeypair,
                                                                                                                                @NotNull
                                                                                                                                @NotNull NSData rootCertificate,
                                                                                                                                @NotNull
                                                                                                                                @NotNull SecKeyRef intermediatePublicKey,
                                                                                                                                @Nullable
                                                                                                                                @Nullable NSNumber issuerId,
                                                                                                                                @Nullable
                                                                                                                                @Nullable NSNumber fabricId,
                                                                                                                                @Nullable
                                                                                                                                @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 16.1 Deprecated-Since: 16.4 Deprecated-Message: Please use createIntermediateCertificate:rootCertificate:intermediatePublicKey:issuerID:fabricID:error:
      • generateOperationalCertificateSigningCertificateOperationalPublicKeyFabricIdNodeIdCaseAuthenticatedTagsError

        @Deprecated
        @Nullable
        public static @Nullable NSData generateOperationalCertificateSigningCertificateOperationalPublicKeyFabricIdNodeIdCaseAuthenticatedTagsError​(@NotNull
                                                                                                                                                    @NotNull MTRKeypair signingKeypair,
                                                                                                                                                    @NotNull
                                                                                                                                                    @NotNull NSData signingCertificate,
                                                                                                                                                    @NotNull
                                                                                                                                                    @NotNull SecKeyRef operationalPublicKey,
                                                                                                                                                    @NotNull
                                                                                                                                                    @NotNull NSNumber fabricId,
                                                                                                                                                    @NotNull
                                                                                                                                                    @NotNull NSNumber nodeId,
                                                                                                                                                    @Nullable
                                                                                                                                                    @Nullable NSArray<? extends NSNumber> caseAuthenticatedTags,
                                                                                                                                                    @Nullable
                                                                                                                                                    @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 16.1 Deprecated-Since: 16.4 Deprecated-Message: Plase use createOperationalCertificate:signingCertificate:operationalPublicKey:fabricID:nodeID:caseAuthenticatedTags:error:
      • generateRootCertificateIssuerIdFabricIdError

        @Deprecated
        @Nullable
        public static @Nullable NSData generateRootCertificateIssuerIdFabricIdError​(@NotNull
                                                                                    @NotNull MTRKeypair keypair,
                                                                                    @Nullable
                                                                                    @Nullable NSNumber issuerId,
                                                                                    @Nullable
                                                                                    @Nullable NSNumber fabricId,
                                                                                    @Nullable
                                                                                    @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Deprecated.
        API-Since: 16.1 Deprecated-Since: 16.4 Deprecated-Message: Please use createRootCertificate:issuerID:fabricID:error:
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isCertificateEqualTo

        public static boolean isCertificateEqualTo​(@NotNull
                                                   @NotNull NSData certificate1,
                                                   @NotNull
                                                   @NotNull NSData certificate2)
        Check whether two X.509 DER encoded certificates are equivalent, in the sense of having the same public key and the same subject DN. Returns NO if public keys or subject DNs cannot be extracted from the certificates.
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • keypairMatchesCertificate

        public static boolean keypairMatchesCertificate​(@NotNull
                                                        @NotNull MTRKeypair keypair,
                                                        @NotNull
                                                        @NotNull NSData certificate)
        Check whether the given keypair's public key matches the given certificate's public key. The certificate is expected to be an X.509 DER encoded certificate. Will return NO on failures to extract public keys from the objects.
      • publicKeyFromCSRError

        @Nullable
        public static @Nullable NSData publicKeyFromCSRError​(@NotNull
                                                             @NotNull NSData csr,
                                                             @Nullable
                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Extract the public key from the given PKCS#10 certificate signing request. This is the public key that a certificate issued in response to the request would need to have. API-Since: 16.4
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.
      • version_static

        public static long version_static()