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

Fixed downloading a certificate from a URL #27

Merged
merged 9 commits into from
Oct 15, 2019

Conversation

NicoleYarroch
Copy link
Contributor

@NicoleYarroch NicoleYarroch commented Oct 10, 2019

Fixes #17

This PR is ready for review.

Risk

This PR makes minor API changes.

Summary

  • Added a a custom error to all the downloading a certificate fail cases.
  • Reduced the timeout interval for a request from 60 seconds to 20 seconds.
  • Changed initWithCertificateServerURL: in the _SDLCertificateManager class to take a String instead of a URL
  • Fixed bug where the certificate directory was not created if the "Application Support" directory did not already exist.

CLA

@NicoleYarroch NicoleYarroch changed the title WIP: Fixed downloading a certificate from a URL Fixed downloading a certificate from a URL Oct 10, 2019

NSURLSession *session = [NSURLSession sharedSession];
__weak typeof(self) weakSelf = self;
NSURLSessionDataTask *task = [session dataTaskWithURL:url completionHandler:^(NSData * _Nullable data, NSURLResponse * _Nullable response, NSError * _Nullable error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The task should probably be stored so that it can be canceled?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created issue #30 to address this comment.

@NicoleYarroch NicoleYarroch merged commit 03c1d90 into develop Oct 15, 2019
@NicoleYarroch NicoleYarroch deleted the bug/issue_17_download_certficate_from_URL branch October 24, 2019 19:05
NicoleYarroch pushed a commit that referenced this pull request Oct 30, 2019
* Add console logs (#14)

* Added console logs

* Add logger class to static setup

* Remove log that gets called too much

* Add descriptions to errors (#18)

* Add descriptions to errors

* Apply suggestions from code review

Co-Authored-By: NicoleYarroch <[email protected]>

* Remove unused podspec (#20)

* Fix outdated OpenSSL dependency (#19)

* Deleted old OpenSSL dependency

* Added new OpenSSL dependency

* supports architectures: armv7, arm64 and simulator (i386, x86_64)

* Fixed the build script throwing an error

* Changed folder name where header files are saved

* Making build work with simulator

* Making build work with Xcode simulator

* Renamed missing fuction files

* Fixed deprecated DTLS_server_method

* Removed deprecated ERR_remove_state

* Fixed deprecated ASN1_STRING_data

* Fixed ONLY_ACTIVE_ARCH warnings

* Removed the resources bundle

* Removed OpenSSL public headers from target

OpenSSL public headers do not need to be added to the target

* Updated OpenSSL libraries

* Custom run script now copies the header files

* Made custom run script more readable

* OpenSSL supports bitcode

* archive files now build for correct architectures

* Changed “build active architecture only” status

Changed “build active architecture only” to yes for dynamic lib

* Change documents directory to app support (#22)

* Certificates can't be pulled from iTunes
* Certificates will be backed up with iCloud

* Updated README (#21)

* Updated the README introduction and config sections

* Added outline for updating the OpenSSL dependency

* Added more steps to README

* Added more information about generating the static library

* Cleaning up wording

* Added disclaimer about security

* fixed spelling

* Apply suggestions from code review

Added additional information and made some grammar fixes.

Co-Authored-By: Joel Fischer <[email protected]>

* Added information about parsing the json

* Added Obj-C code sample

* Fixed wrong file name

* fix typo

* Fixed downloading a certificate from a URL (#27)

* Refactored certficate download code

* Changed certificate manager init to take a string

* Fixed broken test case

* Reduced the default timeout interval

* Removed TODO

* Added weakself to download block

* Fixed directory not being created

* Fixed formatting

* Updated the OpenSSL license in the library documentation (#35)

* Updated OpenSSL license text

* Removed reference to unused cpp-base64 library

Library not needed because iOS has API to encode and decode string from/to Base64

* Use the SDL policy server data as a model for parsing URL response  (#37)

* Parses policy server JSON

* Added JSON information to README

* Apply suggestions from code review

Co-Authored-By: Joel Fischer <[email protected]>

* Added some more detail to JSON snippet

* Consolidate private constants (#39)

* Moved availableMakes to SDLPrivateSecurityConstants

* Removed underscore from `SDLTLSEngine` and `SDLCertificateManager`

* Moved availableMakes to SDLPrivateSecurityConstants

* Fixed test cases after file renaming

* Fixed build settings for SDLSecurityTests target

Switched to “build only for active architectures” for Test target

* Fixed `nil` value for `availableMakes`

* Reordered imports

* Made availableMakes a class property

* Updated the README with new class names

* Added a changelog file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants