@@ -16,10 +16,11 @@ export default function App() {
16
16
</ View >
17
17
</ Modal >
18
18
< Button title = "open modal" onPress = { ( ) => setIsModalVisible ( true ) } />
19
+ < Button title = "fetch - no pin" onPress = { fetchUnpinned } />
19
20
< Button title = "fetch - valid certificates" onPress = { fetchValid } />
20
21
< Button title = "fetch - invalid certificates" onPress = { fetchInvalid } />
21
22
< Button
22
- title = "fetch - invalid certificates - subdodmain "
23
+ title = "fetch - invalid certificates - subdomain "
23
24
onPress = { fetchInvalidSubdomain }
24
25
/>
25
26
< Button title = "Is current keyboard safe?" onPress = { checkIsKeyboardSafe } />
@@ -49,21 +50,33 @@ const styles = StyleSheet.create({
49
50
} ,
50
51
} ) ;
51
52
53
+ const fetchUnpinned = async ( ) => {
54
+ try {
55
+ const response = await fetch ( "https://bing.com" ) ;
56
+ console . warn ( "✅ fetch succeeded" , {
57
+ status : response . status ,
58
+ } ) ;
59
+ } catch ( error ) {
60
+ console . warn ( "❌ fetch failed" , error ) ;
61
+ }
62
+ } ;
63
+
64
+
52
65
const fetchValid = async ( ) => {
53
66
try {
54
67
const response = await fetch ( "https://google.com" ) ;
55
68
console . warn ( "✅ valid certificate and fetch succeeded" , {
56
69
status : response . status ,
57
70
} ) ;
58
71
} catch ( error ) {
59
- console . warn ( "❌ valid certificate but fetch failed" , error ) ;
72
+ console . warn ( "❌ valid certificate but fetch failed - public keys expire, make sure they are up to date " , error ) ;
60
73
}
61
74
} ;
62
75
63
76
const fetchInvalid = async ( ) => {
64
77
try {
65
78
const response = await fetch ( "https://yahoo.com" ) ;
66
- console . warn ( "❌ invalid certificated but fetch succeeded" , {
79
+ console . warn ( "❌ invalid certificate but fetch succeeded" , {
67
80
status : response . status ,
68
81
} ) ;
69
82
} catch ( error ) {
0 commit comments