ritm icon indicating copy to clipboard operation
ritm copied to clipboard

Add SubjectAltName into certificate

Open zt2 opened this issue 6 years ago • 2 comments

Feature:

  • SSL reverse proxy can be accessed from mobile APP

Fix:

  • ERR_CERT_WEAK_KEY
  • Error: "Subject Alternative Name Missing" or NET::ERR_CERT_COMMON_NAME_INVALID

zt2 avatar Feb 13 '20 14:02 zt2

Hi @zt2 thanks for the PR. Unfortunately the test pipeline in circleci doesn't seem to be working (I'm not actively maintaining this project TBH). It seems there're some linting errors with your changes. Can you please run bundle install bundle exec rspec and bundle exec rubocop, fix any problems and update the pull request? Thanks!

argos83 avatar Feb 16 '20 05:02 argos83

Hi @argos83, sorry for reply later, I can pass 'bundle exec rspec' in my environment (too many deprecated warnings).

~/P/ritm [develop] » bundler exec rspec                                                                                                                                                                       16:59:57
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::MONTHNAMES
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::ABBR_MONTHNAMES
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::DAYNAMES
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::ABBR_DAYNAMES
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::ITALY
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::ENGLAND
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::JULIAN
/Users/ztz/.rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/x86_64-darwin19/date_core.bundle: warning: already initialized constant Date::GREGORIAN
/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:94: warning: constant OpenSSL::Digest::Digest is deprecated
/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:96: warning: constant OpenSSL::Digest::Digest is deprecated
== Sinatra (v2.0.8.1) has taken the stage on 4567 for test with backup from Thin
== Sinatra (v2.0.8.1) has taken the stage on 4443 for test with backup from Thin
Thin web server (v1.7.2 codename Bachmanity)
Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Maximum connections set to 1024
Listening on 127.0.0.1:4443, CTRL+C to stop
Listening on 127.0.0.1:4567, CTRL+C to stop
.../Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:94: warning: constant OpenSSL::Digest::Digest is deprecated
./Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:94: warning: constant OpenSSL::Digest::Digest is deprecated
/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:96: warning: constant OpenSSL::Digest::Digest is deprecated
.........*................*............/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:94: warning: constant OpenSSL::Digest::Digest is deprecated
/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:96: warning: constant OpenSSL::Digest::Digest is deprecated
/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:94: warning: constant OpenSSL::Digest::Digest is deprecated
/Users/ztz/.rvm/gems/ruby-2.6.5/gems/certificate_authority-0.1.6/lib/certificate_authority/certificate.rb:96: warning: constant OpenSSL::Digest::Digest is deprecated
....

Pending: (Failures listed here are expected and do not affect your suite's status)

  1) Ritm http when intercepting requests content-length should not update the content-length when disabled
     # Net:HTTP seems to always update content-length
     # ./spec/intercept_spec.rb:107

  2) Ritm https when intercepting requests content-length should not update the content-length when disabled
     # Net:HTTP seems to always update content-length
     # ./spec/intercept_spec.rb:107


Finished in 12.84 seconds (files took 0.52544 seconds to load)
47 examples, 0 failures, 2 pending

Coverage report generated for RSpec to /Users/ztz/Projects/ritm/coverage. 402 / 432 LOC (93.06%) covered.

My Ruby version is ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-darwin19]

zt2 avatar Apr 05 '20 09:04 zt2