Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesigned the framework to make it less vulnerable to native exceptions. #955

Merged
merged 3 commits into from
Oct 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
18 changes: 11 additions & 7 deletions src/wrappers/themis/react-native-themis/ios/RCTThemis.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@

#import <React/RCTBridgeModule.h>

#define BYTEOVERFLOW 255
#define CONTEXTREQUIRED 254
#define PUBLICKEYREQUIRED 253
#define PRIVATEKEYREQUIRED 252

#define BYTEOVERFLOW 255
#define CONTEXTREQUIRED 254
#define PUBLICKEYREQUIRED 253
#define PRIVATEKEYREQUIRED 252
#define DESERIALIZE_ERROR 251
#define DESERIALIZE_MEMORY 250

#define BYTEOVERFLOWREASON "Byte overflow: value is out of range"
#define CONTEXTREQUIREDREASON "Context required"
#define PUBLICKEYREQUIREDREASON "Public key can not be null or blank"
#define PRIVATEKEYREQUIREDREASON "Private key can not be null or blank"
#define DESERIALIZE_ERRORREASON "Deserialize error: empty input data"
#define DESERIALIZE_MEMORYREASON "Deserialize error: can not allocate memory"

#define KEYTYPE_EC 0
#define KEYTYPE_EC 0
#define KEYTYPE_RSA 1


@interface RCTThemis : NSObject <RCTBridgeModule>
@end

Expand Down
Loading