Skip to content

Comments

Reflect special DEFAULT behavior in ciphers(1)#5428

Closed
AloisMahdal wants to merge 1 commit intoopenssl:masterfrom
AloisMahdal:default_as_pfx
Closed

Reflect special DEFAULT behavior in ciphers(1)#5428
AloisMahdal wants to merge 1 commit intoopenssl:masterfrom
AloisMahdal:default_as_pfx

Conversation

@AloisMahdal
Copy link
Contributor

Actual behavior of DEFAULT is different than currently described.
Rather than actinf as cipher string, DEFAULT cannot be combined using
logical operators, etc.

Fixes #5420.

Checklist
  • documentation is added or updated

@openssl-machine openssl-machine added the hold: cla required The contributor needs to submit a license agreement label Feb 21, 2018
@richsalz
Copy link
Contributor

@AloisMahdal we need an individual CLA from you (we have a global corporate RedHat one). Thanks.

@AloisMahdal
Copy link
Contributor Author

(iCLA sent.)

Note that this PR does not address directly the fact that DEFAULTz is equivalent to DEFAULT:z, but it does rule out the assumption that it's treated the same as other "cipher lists". In that sense, it's a bug freeze-in (as @vdukhovni points in #5421).

@richsalz
Copy link
Contributor

See #5429

@richsalz
Copy link
Contributor

open/close to kick the CLA-bot.

@richsalz richsalz closed this Feb 21, 2018
@richsalz richsalz reopened this Feb 21, 2018
@openssl-machine openssl-machine removed the hold: cla required The contributor needs to submit a license agreement label Feb 21, 2018
@richsalz
Copy link
Contributor

How about this minor wording changes:
The cipher list can be prefixed with B keyword, which enables the default
cipher list as defined below. [[delete, it appears below]Content of this list is determined at compile time and
normally corresponds to BALL:!COMPLEMENTOFDEFAULT:!eNULL.]] Unlike cipher
strings, this prefix may not be combined with other strings using B<+> or
B<-> character. For example, B<DEFAULT+DES> is not a valid cipher list.

@vdukhovni
Copy link

Pretty close, but <-> is not a "combining" character, it is only special as the first character of a cipherlist element (-RC4) but clearly not in the middle (RC4-SHA).

@AloisMahdal
Copy link
Contributor Author

Updated:

  • moved "default" explanation to next paragraph,
  • added "the",
  • removed mention of - as combining character,
  • rebased on master.

Copy link
Contributor

@richsalz richsalz left a comment

Choose a reason for hiding this comment

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

two minor changes. thanks for doing this. i will close mine.

Copy link
Contributor

Choose a reason for hiding this comment

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

"The cipher list"

Copy link
Contributor

Choose a reason for hiding this comment

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

Unlike the cipher string ...

@AloisMahdal
Copy link
Contributor Author

Thanks for feedback. (Need to read up something on usage of "the".) Updated: addded the's, re-wrapped and rebased on master.

Copy link

@vdukhovni vdukhovni Feb 23, 2018

Choose a reason for hiding this comment

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

s/B<DEFAULT>/the B<DEFAULT>/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

Choose a reason for hiding this comment

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

s/Unlike the cipher string/Unlike other cipher strings/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wouldn't that imply DEFAULT is a cipher string? Because it's not... (at least that's what I'm trying to say)

Choose a reason for hiding this comment

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

s/valid cipher list/valid cipher string/

Choose a reason for hiding this comment

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

Mind you, the real story is more subtle (back to the BUGS issue), since DEFAULT+FOO is surprisingly instead "DEFAULT:+FOO", which would put FOO last (for any value of FOO). So the users who specify "DEFAULT+FOO" do not get anything like what they probably intended. If that's described, then it goes into a BUGS section, and must not be described as a stable interface.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed the the. See below for comment on BUGS.

Choose a reason for hiding this comment

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

s/Content/The content/

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, thanks.

Actual behavior of DEFAULT is different than currently described.
Rather than actinf as cipher string, DEFAULT cannot be combined using
logical operators, etc.

Fixes #5420.
@AloisMahdal
Copy link
Contributor Author

AloisMahdal commented Feb 23, 2018

Fixed most issues (i was not sure about the the vs. other.

Anyway, I agree with @vdukhovni that it's not a good idea to describe this as stable interface. I opened (yet) another PR #5455 where I described it as part of BUGS section (I added it following convention described in man-pages(7).)

See L<SSL_CTX_set_security_level> for a description of what each level means.

The cipher list can be prefixed with the B<DEFAULT> keyword, which enables
the default cipher list as defined below. Unlike the cipher string,

Choose a reason for hiding this comment

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

The text here really does need to change. The simplest change is from 'Unlike the' to 'Unlike other'. If you want to provide more detail, you could explain that all other cipher strings are "+" separated conjunctions (AND) of basic cipher strings, which represent a single cipher or class of ciphers sharing a common elementary property. The "DEFAULT" keywork is not such a cipher string, it is instead a built-in cipher list definition that can be a starting point for further refinement, but is not combinable with "+", and must come first.

Copy link
Member

Choose a reason for hiding this comment

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

Re s/Unlike the/Unlike other/, the way things are expressed here, DEFAULT isn't a cipher string, but rather a prefix. Seen that way, 'other' would be wrong, wouldn't it? Although, I might want to see that changed to 'Unlike cipher strings, ...'

@richsalz
Copy link
Contributor

richsalz commented Mar 7, 2018

@AloisMahdal , @vdukhovni any update?

@vdukhovni
Copy link

Just English grammar nits in the docs.

@AloisMahdal
Copy link
Contributor Author

Actually, based on @vdukhovni's feedback I've opened also #5455, which takes another approach to solve this #5420 issue by describing the behavior in BUGS section.

My hope is that the community will choose which approach is better and merge one PR and close the other.

@mattcaswell mattcaswell added this to the 1.1.1 milestone Mar 20, 2018
@levitte
Copy link
Member

levitte commented Mar 29, 2018

It seems that this is preferred to #5455. Please see @vdukhovni's commentary there to do some adjustments here.

@levitte
Copy link
Member

levitte commented Apr 19, 2018

This PR seems to have gone stale. I could see this being approved with the following editorial fixup:

diff --git a/doc/man1/ciphers.pod b/doc/man1/ciphers.pod
index 6da316db89..751518d1c2 100644
--- a/doc/man1/ciphers.pod
+++ b/doc/man1/ciphers.pod
@@ -157,9 +157,9 @@ level to B<n>, which should be a number between zero and five, inclusive.
 See L<SSL_CTX_set_security_level> for a description of what each level means.
 
 The cipher list can be prefixed with the B<DEFAULT> keyword, which enables
-the default cipher list as defined below.  Unlike the cipher string,
+the default cipher list as defined below.  Unlike cipher strings,
 this prefix may not be combined with other strings using B<+> character.
-For example, B<DEFAULT+DES> is not a valid cipher string.
+For example, B<DEFAULT+DES> is not valid.
 
 The content of the default list is determined at compile time and normally
 corresponds to B<ALL:!COMPLEMENTOFDEFAULT:!eNULL>.

What say @openssl?

@richsalz
Copy link
Contributor

Yes, please, merge this with your change. +1

Copy link
Contributor

@richsalz richsalz left a comment

Choose a reason for hiding this comment

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

Merge and do your fix.

@levitte
Copy link
Member

levitte commented Apr 19, 2018

Merged into master with mentioned editorial changes.

c190506 Reflect special DEFAULT behavior in ciphers(1)

@levitte levitte closed this Apr 19, 2018
levitte pushed a commit that referenced this pull request Apr 19, 2018
Actual behavior of DEFAULT is different than currently described.
Rather than actinf as cipher string, DEFAULT cannot be combined using
logical operators, etc.

Fixes #5420.

Reviewed-by: Rich Salz <[email protected]>
Reviewed-by: Richard Levitte <[email protected]>
(Merged from #5428)
@AloisMahdal AloisMahdal deleted the default_as_pfx branch April 20, 2018 11:48
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.

6 participants