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

BoringSSL doesn't have BIO_sock_non_fatal_error() #1438

Merged
merged 1 commit into from
Feb 10, 2017

Conversation

jablko
Copy link
Contributor

@jablko jablko commented Feb 10, 2017

Fixes #1437

@jablko jablko self-assigned this Feb 10, 2017
@jablko jablko added the TLS label Feb 10, 2017
@jablko jablko added this to the 7.2.0 milestone Feb 10, 2017
@atsci
Copy link

atsci commented Feb 10, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1516/ for details.

@atsci
Copy link

atsci commented Feb 10, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1410/ for details.

@atsci
Copy link

atsci commented Feb 10, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/81/ for details.

@atsci
Copy link

atsci commented Feb 10, 2017

Linux build successful! See https://ci.trafficserver.apache.org/job/linux-github/1411/ for details.

@atsci
Copy link

atsci commented Feb 10, 2017

FreeBSD build successful! See https://ci.trafficserver.apache.org/job/freebsd-github/1517/ for details.

@atsci
Copy link

atsci commented Feb 10, 2017

clang-analyzer build successful! See https://ci.trafficserver.apache.org/job/clang-analyzer-github/82/ for details.

@masaori335 masaori335 merged commit 2011c40 into apache:master Feb 10, 2017
// bio_fd_non_fatal_error() instead.) #1437
//
// The following is copied from
// https://github.com/openssl/openssl/blob/3befffa39dbaf2688d823fcf2bdfc07d2487be48/crypto/bio/bss_sock.c
Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we need to add "OpenSSL License" in LICENSE file, because this is just copy.
(Sorry for I should have noticed this before merge)

Copy link
Contributor

Choose a reason for hiding this comment

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

@jablko How about just add a function like this? We don't support WINDOWS and don't need those "#ifdef". Just checking error codes looks enough.

static int
non_fetal_error(int err)
{
  if (err == EWOULDBLOCK || err == ENOTCONN || err == EINTR || err == EAGAIN || err == EPROTO || err == EINPROGRESS || err == EALREADY) {
    return 1;
  }
  return 0;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That works ... Is the purpose to avoid having to attribute it?

In general, I like to code for OpenSSL, and add fixes to make other environments conform to it -- unless there's a reason not to. So in this case I'd continue calling BIO_sock_non_fatal_error(), and copy it verbatim from OpenSSL if it's missing.

Functionally, your solution is equivalent (and cleaner!), but unless there's a reason not to use OpenSSL's function, that's the style I prefer. I'm happy either way, though :-)

I'll open a PR to add attribution to the NOTICE file.

Copy link
Contributor

Choose a reason for hiding this comment

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

I understood. Let's add the attribution to the NOTICE file and use code from OpenSSL.

@zwoop
Copy link
Contributor

zwoop commented Feb 11, 2017

Did we add the necessary attribution to NOTICES files? If not, please do so.

@zwoop zwoop modified the milestones: 7.1.0, 7.2.0 Feb 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants