Interface SecurityFramework

  • All Superinterfaces:
    com.sun.jna.Library

    public interface SecurityFramework
    extends com.sun.jna.Library
    • Field Detail

      • SEC_CERTIFICATE_TYPE_ID

        static final com.sun.jna.platform.mac.CoreFoundation.CFTypeID SEC_CERTIFICATE_TYPE_ID
      • SEC_POLICY_TYPE_ID

        static final com.sun.jna.platform.mac.CoreFoundation.CFTypeID SEC_POLICY_TYPE_ID
      • kSecPolicyAppleSSL

        static final com.sun.jna.platform.mac.CoreFoundation.CFStringRef kSecPolicyAppleSSL
        Basic X509 plus host name verification per RFC 2818.
        See Also:
        developer.apple.com
      • kSecPolicyOid

        static final com.sun.jna.platform.mac.CoreFoundation.CFStringRef kSecPolicyOid
        The object identifier that defines the policy type (CFStringRef). All policies have a value for this key.
        See Also:
        developer.apple.com
      • kSecTrustSettingsResult

        static final com.sun.jna.platform.mac.CoreFoundation.CFStringRef kSecTrustSettingsResult
        A number indicating the effective trust setting for this usage constraints dictionary.
        See Also:
        developer.apple.com
      • kSecTrustSettingsAllowedError

        static final com.sun.jna.platform.mac.CoreFoundation.CFStringRef kSecTrustSettingsAllowedError
        A number which, if encountered during certificate verification, is ignored for that certificate.
        See Also:
        developer.apple.com
      • kSecTrustSettingsPolicyName

        static final com.sun.jna.platform.mac.CoreFoundation.CFStringRef kSecTrustSettingsPolicyName
        Specifies a cert verification policy, e.g., sslServer, eapClient, etc. using policy names. This entry can be used to restrict the policy where the same Policy Constant is used for multiple policyNames
      • kSecTrustSettingsPolicy

        static final com.sun.jna.platform.mac.CoreFoundation.CFStringRef kSecTrustSettingsPolicy
        A policy object specifying the certificate verification policy.
        See Also:
        developer.apple.com
    • Method Detail

      • SecCopyErrorMessageString

        @Nullable
        com.sun.jna.platform.mac.CoreFoundation.CFStringRef SecCopyErrorMessageString​(@NotNull
                                                                                      @NotNull SecurityFramework.OSStatus status,
                                                                                      @Nullable
                                                                                      @Nullable com.sun.jna.Pointer reserved)
        Returns a string explaining the meaning of a security result code.
        Parameters:
        status - A result code of type OSStatus returned by a security function. See Security Framework Result Codes for a list of codes.
        reserved - Reserved for future use. Pass NULL for this parameter.
        Returns:
        A human-readable string describing the result, or NULL if no string is available for the specified result code. Call the CoreFoundation.CFRelease(CoreFoundation.CFTypeRef) function to release this object when you are finished using it.
        See Also:
        developer.apple.com
      • SecCertificateGetTypeID

        com.sun.jna.platform.mac.CoreFoundation.CFTypeID SecCertificateGetTypeID()
      • SecPolicyGetTypeID

        com.sun.jna.platform.mac.CoreFoundation.CFTypeID SecPolicyGetTypeID()
      • SecPolicyCopyProperties

        com.sun.jna.platform.mac.CoreFoundation.CFDictionaryRef SecPolicyCopyProperties​(SecurityFramework.SecPolicyRef policyRef)
        Returns a dictionary containing a policy’s properties.
        Parameters:
        policyRef - The policy from which properties should be copied.
        Returns:
        A dictionary with the policy's properties. See Security Policy Keys for a list of valid keys. Call the CoreFoundation.CFRelease(CoreFoundation.CFTypeRef) function to free the dictionary's memory when you are done with it.
        See Also:
        developer.apple.com
      • SecCertificateCopyData

        com.sun.jna.platform.mac.CoreFoundation.CFDataRef SecCertificateCopyData​(SecurityFramework.SecCertificateRef certificate)
        Returns a DER representation of a certificate given a certificate object.
        Parameters:
        certificate - The certificate object for which you wish to return the DER (Distinguished Encoding Rules) representation of the X.509 certificate.
        Returns:
        The DER representation of the certificate. Call the CoreFoundation.CFRelease(CoreFoundation.CFTypeRef) function to release this object when you are finished with it. Returns NULL if the data passed in the certificate parameter is not a valid certificate object.
        See Also:
        developer.apple.com