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

added support for extendedKeyUsage and RSA key length #28

Merged
merged 4 commits into from
Nov 27, 2016

Conversation

alisade
Copy link
Contributor

@alisade alisade commented Aug 9, 2016

No description provided.

@zuazo
Copy link
Owner

zuazo commented Aug 10, 2016

Hi @alisade,

Thanks for your PR 😄

Please, could you update the README with your changes and fix the style tests?

RuboCop offenses:

$ rake style
Starting Foodcritic linting...
Completed!
Running RuboCop...
Inspecting 55 files
................................................CCC....

Offenses:

libraries/resource_ssl_certificate_generators.rb:34:7: C: Module has too many lines. [205/202]
      module Generators ...
      ^^^^^^^^^^^^^^^^^
libraries/resource_ssl_certificate_generators.rb:35:32: C: Surrounding space missing in default value assignment.
        def generate_key(length=2048)
                               ^
libraries/resource_ssl_certificate_generators.rb:151:9: C: Method has too many lines. [14/10]
        def generate_self_signed_cert_without_ca(key, cert, subject) ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
libraries/resource_ssl_certificate_generators.rb:160:1: C: Trailing whitespace detected.

^^^^^^^^^^
libraries/resource_ssl_certificate_generators.rb:187:9: C: Method has too many lines. [15/10]
        def generate_self_signed_cert_with_ca(key, cert, subject, ca_cert_cont, ...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
libraries/resource_ssl_certificate_cert.rb:34:7: C: Module has too many lines. [209/202]
      module Cert ...
      ^^^^^^^^^^^
libraries/resource_ssl_certificate_key.rb:139:81: C: Line is too long. [82/80]
            read_namespace(%w(ssl_key length)) || read_namespace('length') || 2048
                                                                                ^^

55 files inspected, 7 offenses detected
RuboCop failed!

Besides that, adding an example in the integration tests would be awesome, but not required.

See TESTING for some information about the tests. Feel free to ask me for help if you have doubts about them.

@hawkandbaby
Copy link

It appears to me that the two "Module has too many lines" errors will involve major refactoring. Would it be cleaner to accept the PR, then do a refactoring PR?

Would two seperate commits in one PR suffice?

@zuazo
Copy link
Owner

zuazo commented Nov 17, 2016

Yes @hawkandbaby. Of course we can change the maximum module length in the .rubocop.yml.

But, anyway, the other offenses need to be fixed and documentation needs to be added to this PR.

HawkAndBaby and others added 3 commits November 24, 2016 02:19
assignment spaces.

Resolved Rubocop warnings:

libraries/resource_ssl_certificate_generators.rb:35:32: C: Surrounding
space missing in default value assignment.
        def generate_key(length=2048)
                               ^

libraries/resource_ssl_certificate_generators.rb:160:1: C: Trailing
whitespace detected.

^^^^^^^^^^

libraries/resource_ssl_certificate_key.rb:139:81: C: Line is too long.
[82/80]
            read_namespace(%w(ssl_key length)) ||
read_namespace('length') || 2048
                              ^^
Added length and extended_key_usage to namespace parameter list.

Added key_length and extended_key_usage parameter defaults and
description table
Added documentation for key_length and extended_key_usage parameters.
@hawkandbaby
Copy link

It looks like the travis constraints need updating:
rack-2.0.1 requires ruby version >= 2.2.2, which is incompatible with the current version, ruby 2.2.0p0

@zuazo
Copy link
Owner

zuazo commented Nov 26, 2016

@hawkandbaby thanks for your work.

Don't worry about travis. I going to check it manually 😉

@zuazo zuazo self-assigned this Nov 27, 2016
zuazo added a commit that referenced this pull request Nov 27, 2016
@zuazo zuazo merged commit e2a7ea3 into zuazo:master Nov 27, 2016
@zuazo
Copy link
Owner

zuazo commented Nov 27, 2016

Merged.

RuboCop configuration changed in 5cfbf17, and unit and integration tests added in 9b0b7da.

@zuazo zuazo mentioned this pull request Nov 27, 2016
@zuazo
Copy link
Owner

zuazo commented Nov 28, 2016

Released in 2.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants