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

Update issuer name in the library to match the one in the sample certificate #20

Merged
merged 4 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class Constants {
final static String CERT_URL = "http://run.mocky.io/v3/b095b2ad-65c4-4d33-8091-dae175c540d3";
final static List<String> MAKE_LIST = Collections.singletonList("SDL");
final static String CERT_PASS = "password"; // This needs to be changed to the actual certificate password
final static String CERT_ISSUER = "SDL"; // This needs to be changed to the actual certificate issuer
final static String CERT_ISSUER = "/C=US/ST=Michigan/L=Royal Oak/O=Livio/CN=localhost/emailAddress=jacob@livio.io"; // This needs to be changed to the actual certificate issuer

static {
try {
Expand Down
4 changes: 2 additions & 2 deletions SdlSecurity/sdl_security/src/main/jni/tlsEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ bool initialize(JNIEnv* env, void* cert_buffer, int cert_len, bool is_client) {
char* cert_issuer = X509_NAME_oneline(X509_get_issuer_name(certX509), NULL, 0);
if (strcmp(cert_issuer, CERT_ISSUER) != 0) {
printf("Error in verifying issuer name. Expected %s but found %s\n", CERT_ISSUER, cert_issuer);
// we are only printing error message in that case to make testing easier
// it should stop initialization and return false in production libraries
clean_up_initialization(certX509, rsa, p12, pbio, pkey);
return false;
}

rsa = EVP_PKEY_get1_RSA(pkey);
Expand Down
Binary file modified SdlSecurity/sdl_security/src/main/libs/arm64-v8a/libsecurity.so
Binary file not shown.
Binary file modified SdlSecurity/sdl_security/src/main/libs/x86/libsecurity.so
Binary file not shown.
Binary file modified SdlSecurity/sdl_security/src/main/libs/x86_64/libsecurity.so
Binary file not shown.
Binary file modified SdlSecurity/sdl_security_se/libs/libsecurity.jar
Binary file not shown.
Binary file modified SdlSecurity/sdl_security_se/src/main/libs/libsecurity.dylib
Binary file not shown.