UNPKG

@ankitp5/capacitor-ssl-pinning

Version:
66 lines 4.35 kB
{ "api": { "name": "SSLCertificateCheckerPlugin", "slug": "sslcertificatecheckerplugin", "docs": "Interface defining the structure of an SSL Certificate Checker Plugin.\n\nImplementations of this interface should provide the logic for checking\nthe status and details of an SSL certificate based on the provided options.", "tags": [], "methods": [ { "name": "checkCertificate", "signature": "(options: SSLCertificateCheckerOptions) => Promise<SSLCertificateCheckerResult>", "parameters": [ { "name": "options", "docs": "- Configuration options that determine the behavior of the SSL check.\nThese options may include properties such as the target domain, port,\nand other settings required for certificate validation.", "type": "SSLCertificateCheckerOptions" } ], "returns": "Promise<SSLCertificateCheckerResult>", "tags": [ { "name": "param", "text": "options - Configuration options that determine the behavior of the SSL check.\nThese options may include properties such as the target domain, port,\nand other settings required for certificate validation." }, { "name": "returns", "text": "A promise that resolves to an SSLCertificateCheckerResult object,\nwhich contains information about the certificate, including its validity,\nexpiration date, and potential issues." } ], "docs": "Checks the SSL certificate for a given domain or IP address.", "complexTypes": [ "SSLCertificateCheckerResult", "SSLCertificateCheckerOptions" ], "slug": "checkcertificate" } ], "properties": [] }, "interfaces": [], "enums": [], "typeAliases": [ { "name": "SSLCertificateCheckerResult", "slug": "sslcertificatecheckerresult", "docs": "", "types": [ { "text": "{\n /**\n * The subject of the certificate, representing the entity the certificate is issued to.\n * @platform Android\n * Example: \"CN=example.com, O=Example Corp, C=US\"\n */\n subject?: string;\n\n /**\n * The issuer of the certificate, indicating the certificate authority that issued it.\n * Results may vary slightly between iOS and Android platforms.\n * Example: \"CN=Example CA, O=Example Corp, C=US\"\n */\n issuer?: string;\n\n /**\n * The start date from which the certificate is valid.\n * Format: ISO 8601 string or platform-specific date representation.\n * @platform Android\n * Example: \"2023-01-01T00:00:00Z\"\n */\n validFrom?: string;\n\n /**\n * The end date until which the certificate is valid.\n * Format: ISO 8601 string or platform-specific date representation.\n * @platform Android\n * Example: \"2024-01-01T00:00:00Z\"\n */\n validTo?: string;\n\n /**\n * The fingerprint that is expected to match the certificate's actual fingerprint.\n * This is typically provided in the SSLCertificateCheckerOptions.\n */\n expectedFingerprint?: string;\n\n /**\n * The actual fingerprint of the SSL certificate retrieved from the server.\n * Example: \"50:4B:A1:B5:48:96:71:F3:9F:87:7E:0A:09:FD:3E:1B:C0:4F:AA:9F:FC:83:3E:A9:3A:00:78:88:F8:BA:60:26\"\n */\n actualFingerprint?: string;\n\n /**\n * Indicates whether the actual fingerprint matches the expected fingerprint.\n * `true` if they match, `false` otherwise.\n */\n fingerprintMatched?: boolean;\n\n /**\n * A descriptive error message if an issue occurred during the SSL certificate check.\n * Example: \"Unable to retrieve certificate from the server.\"\n */\n error?: string;\n}", "complexTypes": [] } ] }, { "name": "SSLCertificateCheckerOptions", "slug": "sslcertificatecheckeroptions", "docs": "", "types": [ { "text": "{\n /**\n * The URL of the server whose SSL certificate needs to be checked.\n * Example: \"https://example.com\"\n */\n url: string;\n\n /**\n * The expected fingerprint of the SSL certificate to validate against.\n * This is typically a hash string such as SHA-256.\n */\n fingerprint: string;\n}", "complexTypes": [] } ] } ], "pluginConfigs": [] }