Skip to content

Commit

Permalink
remove examples, fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Gerullis committed Aug 2, 2024
1 parent ff8f75c commit 990998f
Show file tree
Hide file tree
Showing 81 changed files with 26 additions and 1,796 deletions.
2 changes: 1 addition & 1 deletion CertificateChecker.podspec → CapacitorSslPinning.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))

Pod::Spec.new do |s|
s.name = 'CertificateChecker'
s.name = 'CapacitorSslPinning'
s.version = package['version']
s.summary = package['description']
s.license = package['license']
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import PackageDescription

let package = Package(
name: "CertificateChecker",
name: "CapacitorSslPinning",
platforms: [.iOS(.v13)],
products: [
.library(
name: "CertificateChecker",
name: "CapacitorSslPinning",
targets: ["SSLCertificateCheckerPlugin"])
],
dependencies: [
Expand Down
67 changes: 19 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ npx cap sync

<docgen-index>

- [`checkCertificate(...)`](#checkcertificate)
* [`checkCertificate(...)`](#checkcertificate)
* [Type Aliases](#type-aliases)

</docgen-index>

Expand All @@ -37,59 +38,29 @@ npx cap sync
### checkCertificate(...)

```typescript
checkCertificate(options: SSLCertificateCheckerOptions) => Promise<SSLCertificateCheckerResult>
```

export type SSLCertificateCheckerOptions = {
url: string;
fingerprint: string;
};

export type SSLCertificateCheckerResult = {
/**
* The subject of the certificate
* @platform Android
*/
subject?: string;
/**
* The issuer of the certificate
* @platform Android
*/
issuer?: string;
/**
* The valid from date of the certificate
* @platform Android
*/
validFrom?: string;
/**
* The valid to date of the certificate
* @platform Android
*/
validTo?: string;
/**
* The fingerprint of the certificate
* @platform Android
*/
fingerprint?: string;
/**
* Whether the fingerprint matches the expected fingerprint
*/
fingerprintMatched?: boolean;
/**
* The error that occurred while checking the certificate
*/
error?: string;
};
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------- |
| **`options`** | <code><a href="#sslcertificatecheckeroptions">SSLCertificateCheckerOptions</a></code> |

**Returns:** <code>Promise&lt;<a href="#sslcertificatecheckerresult">SSLCertificateCheckerResult</a>&gt;</code>

checkCertificate(options: SSLCertificateCheckerOptions) => Promise<SSLCertificateCheckerResult>
```
--------------------


### Type Aliases


#### SSLCertificateCheckerResult

<code>{ /** * The subject of the certificate * @platform Android */ subject?: string; /** * The issuer of the certificate * @platform Android */ issuer?: string; /** * The valid from date of the certificate * @platform Android */ validFrom?: string; /** * The valid to date of the certificate * @platform Android */ validTo?: string; /** * The fingerprint of the certificate * @platform Android */ fingerprint?: string; /** * Whether the fingerprint matches the expected fingerprint */ fingerprintMatched?: boolean; /** * The error that occurred while checking the certificate */ error?: string; }</code>

| Param | Type |
| ------------- | ----------------------------------------- |
| **`options`** | <code>SSLCertificateCheckerOptions</code> |

**Returns:** <code>Promise&lt;SSLCertificateCheckerResult&gt;</code>
#### SSLCertificateCheckerOptions

---
<code>{ url: string; fingerprint: string; }</code>

</docgen-api>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// android/src/main/java/com/your/plugin/CertificateChecker.java
// android/src/main/java/com/your/plugin/CapacitorSslPinning.java

package com.tonybluckdruck.certificatechecker;

Expand Down
7 changes: 0 additions & 7 deletions example/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions example/README.md

This file was deleted.

101 changes: 0 additions & 101 deletions example/android/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions example/android/app/.gitignore

This file was deleted.

54 changes: 0 additions & 54 deletions example/android/app/build.gradle

This file was deleted.

21 changes: 0 additions & 21 deletions example/android/app/capacitor.build.gradle

This file was deleted.

21 changes: 0 additions & 21 deletions example/android/app/proguard-rules.pro

This file was deleted.

This file was deleted.

Loading

0 comments on commit 990998f

Please sign in to comment.