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

kern: get ssl_session in the *SSL_get_session() order . #193

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

cfc4n
Copy link
Member

@cfc4n cfc4n commented Sep 8, 2022

fixes: #187

SSL_SESSION *SSL_get_session(const SSL *ssl) from boringssl src/ssl/ssl_session.cc

SSL_SESSION *SSL_get_session(const SSL *ssl) {
  // Once the handshake completes we return the established session. Otherwise
  // we return the intermediate session, either |session| (for resumption) or
  // |new_session| if doing a full handshake.
  if (!SSL_in_init(ssl)) {
    return ssl->s3->established_session.get();
  }
  SSL_HANDSHAKE *hs = ssl->s3->hs.get();
  if (hs->early_session) {
    return hs->early_session.get();
  }
  if (hs->new_session) {
    return hs->new_session.get();
  }
  return ssl->session.get();
}

Signed-off-by: CFC4N cfc4n.cs@gmail.com

SSL_SESSION *SSL_get_session(const SSL *ssl) from boringssl src/ssl/ssl_session.cc

SSL_SESSION *SSL_get_session(const SSL *ssl) {
  // Once the handshake completes we return the established session. Otherwise
  // we return the intermediate session, either |session| (for resumption) or
  // |new_session| if doing a full handshake.
  if (!SSL_in_init(ssl)) {
    return ssl->s3->established_session.get();
  }
  SSL_HANDSHAKE *hs = ssl->s3->hs.get();
  if (hs->early_session) {
    return hs->early_session.get();
  }
  if (hs->new_session) {
    return hs->new_session.get();
  }
  return ssl->session.get();
}

Signed-off-by: CFC4N <cfc4n.cs@gmail.com>
@cfc4n cfc4n added bug Something isn't working fix bug fix PR labels Sep 8, 2022
@cfc4n cfc4n merged commit cc94485 into master Sep 9, 2022
@cfc4n cfc4n deleted the boringssl-session-offset branch September 9, 2022 11:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fix bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

on Android 12, cannot decrypt TLS 1.2 packet while used boringssl with pcapng model
2 participants