Skip to content

Comments

Move extension data into sub-structs#2052

Closed
richsalz wants to merge 5 commits intoopenssl:masterfrom
richsalz:shorter-field-names
Closed

Move extension data into sub-structs#2052
richsalz wants to merge 5 commits intoopenssl:masterfrom
richsalz:shorter-field-names

Conversation

@richsalz
Copy link
Contributor

@richsalz richsalz commented Dec 8, 2016

So instead of tlsext_hostname, for example, you have ext.hostname. It ensures that all extension stuff is at least grouped together. And shorter more consistent names for some things. Lists end in plural and have a matching _len element. ALPN and NPN are spelled with four or three letters, not next_proto and next_protos, inconsistently. And so on.

@richsalz richsalz self-assigned this Dec 8, 2016
@kaduk
Copy link
Contributor

kaduk commented Dec 8, 2016

IIRC, some of these fields have different semantics for client vs. server SSL{,_CTX} objects. (tlsext_hostname is one that comes to mind, though there is also a field of that name in SSL_SESSION just to make things extra confusing, so maybe I am misremembering.) Do we want to differentiate the semantics based on field name, and if so is this the right place to make such a change?

@richsalz
Copy link
Contributor Author

richsalz commented Dec 8, 2016

I am reluctant to tease apart re-used field names here, as this is strictly just textual renaming.

@kaduk
Copy link
Contributor

kaduk commented Dec 8, 2016

Sounds good; keeping the scope limited is fine by me.

levitte
levitte previously requested changes Dec 8, 2016
Copy link
Member

@levitte levitte left a comment

Choose a reason for hiding this comment

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

Quick review. I will get back to this next week if needed.

util/libssl.num Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Rename

util/libssl.num Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Remove

@levitte
Copy link
Member

levitte commented Dec 8, 2016

Frankly, I'm hesitant about the renaming of global functions. Our code style guide says this in "Chapter 4: Naming":

Global variables (to be used only if you REALLY need them) need to
have descriptive names, as do global functions. If you have a function
that counts the number of active users, you should call that
count_active_users() or similar, you should NOT call it cntusr().

@FdaSilvaYY
Copy link
Contributor

ABI compatibility ?

@richsalz
Copy link
Contributor Author

richsalz commented Dec 8, 2016

I guess I got the ABI backwards, make the newname an alias to the old name. Will fix, tnx @FdaSilvaYY.

Nobody calls the TLS extension anything other than ALPN and NPN, @levitte

@richsalz
Copy link
Contributor Author

richsalz commented Dec 8, 2016

updated commit pushed.

@levitte
Copy link
Member

levitte commented Dec 8, 2016

@richsalz, I just realised that a function rename like this is an ABI change (not addition). Therefore, this is 1.2.0 material as it currently stands.

@richsalz
Copy link
Contributor Author

richsalz commented Dec 8, 2016

yes, i fixed that.

@levitte
Copy link
Member

levitte commented Dec 8, 2016

Never mind, now I see that the rename / alias thing has been reversed

@richsalz richsalz dismissed levitte’s stale review December 12, 2016 16:20

ABI/renaming addressed.

@levitte
Copy link
Member

levitte commented Dec 21, 2016

It would be nice if you rebased onto a fresher master

@richsalz
Copy link
Contributor Author

rebased and push'd

@richsalz
Copy link
Contributor Author

richsalz commented Jan 2, 2017

ping @levitte post-Jan 1 :)

Add option ExpectedTmpKeyType to test the temporary key the server
sends is of the correct type.

Reviewed-by: Kurt Roeckx <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #2191)
Reviewed-by: Kurt Roeckx <[email protected]>
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #2191)
ssl/s3_lib.c Outdated
Copy link
Member

Choose a reason for hiding this comment

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

Probably should adjust the indentation on this line

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes. and also fixed it in ssl_locl.h

ssl/ssl_sess.c Outdated
Copy link
Member

Choose a reason for hiding this comment

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

ext_data != NULL

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.

Copy link
Member

@mattcaswell mattcaswell left a comment

Choose a reason for hiding this comment

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

Yawn! This all looks very straight forward...a big search and replace job mainly! A couple of minor review comments above. Assuming those get fixed: +1

Copy link
Member

@mattcaswell mattcaswell left a comment

Choose a reason for hiding this comment

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

Oh...I take that back. Just spotted that travis and appveyor are failing for this PR...that needs sorting first.

@richsalz
Copy link
Contributor Author

richsalz commented Jan 9, 2017

added commit and rebased/pushed. let's see if travis works now...

@richsalz
Copy link
Contributor Author

richsalz commented Jan 9, 2017

ping @mattcaswell -- travis and appveyor passed.

@mattcaswell mattcaswell added the approval: done This pull request has the required number of approvals label Jan 9, 2017
@richsalz
Copy link
Contributor Author

thanks.

@richsalz richsalz closed this Jan 10, 2017
levitte pushed a commit that referenced this pull request Jan 10, 2017
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #2052)
levitte pushed a commit that referenced this pull request Jan 10, 2017
levitte pushed a commit that referenced this pull request Jan 10, 2017
Reviewed-by: Matt Caswell <[email protected]>
(Merged from #2052)
@richsalz richsalz deleted the shorter-field-names branch January 10, 2017 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants