René's URL Explorer Experiment


Title: createSocket with consumed InputStream and com.sun.net.ssl.requireCloseNotify throws SocketException · Issue #2142 · bcgit/bc-java · GitHub

Open Graph Title: createSocket with consumed InputStream and com.sun.net.ssl.requireCloseNotify throws SocketException · Issue #2142 · bcgit/bc-java

X Title: createSocket with consumed InputStream and com.sun.net.ssl.requireCloseNotify throws SocketException · Issue #2142 · bcgit/bc-java

Description: When the createSocket factory method is used with a non-null InputStream consumed argument, a SequenceInputStream is created. One consideration with using SequenceInputStream is the following After each input stream from the enumeration ...

Open Graph Description: When the createSocket factory method is used with a non-null InputStream consumed argument, a SequenceInputStream is created. One consideration with using SequenceInputStream is the following After...

X Description: When the createSocket factory method is used with a non-null InputStream consumed argument, a SequenceInputStream is created. One consideration with using SequenceInputStream is the following After...

Opengraph URL: https://github.com/bcgit/bc-java/issues/2142

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"createSocket with consumed InputStream and com.sun.net.ssl.requireCloseNotify throws SocketException","articleBody":"When the createSocket factory method is used with a non-null `InputStream consumed` argument, a [SequenceInputStream is created](https://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/jsse/provider/ProvSSLSocketWrap.java#L593). One consideration with using SequenceInputStream is the following\n\n> After each input stream from the enumeration is exhausted, it is closed by calling its close method.\n\nhttps://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/SequenceInputStream.html\n\nIf a client opens a connection, handshakes successfully, writes some data, then closes the connection without sending close_notify, this will typically result in a [TlsNoCloseNotifyException being thrown](https://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/tls/TlsProtocol.java#L909). If the [`com.sun.net.ssl.requireCloseNotify`](https://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/jsse/provider/JsseUtils.java#L79-L80) is set to false, then instead we [send our own close_notify](https://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/tls/TlsProtocol.java#L880). If this property is used in combination with the `InputStream consumed` argument, BC will try to write to a closed socket and throw a SocketException\n\n```\njava.net.SocketException: Socket closed\nsun.nio.ch.NioSocketImpl.ensureOpenAndConnected (NioSocketImpl.java:165)\nsun.nio.ch.NioSocketImpl.beginWrite (NioSocketImpl.java:371)\nsun.nio.ch.NioSocketImpl.implWrite (NioSocketImpl.java:416)\nsun.nio.ch.NioSocketImpl.write (NioSocketImpl.java:445)\nsun.nio.ch.NioSocketImpl$2.write (NioSocketImpl.java:831)\njava.net.Socket$SocketOutputStream.write (Socket.java:1035)\norg.bouncycastle.tls.RecordStream.writeRecord (RecordStream.java:309)\norg.bouncycastle.tls.TlsProtocol.safeWriteRecord (TlsProtocol.java:950)\norg.bouncycastle.tls.TlsProtocol.raiseAlertWarning (TlsProtocol.java:1721)\norg.bouncycastle.tls.TlsProtocol.handleClose (TlsProtocol.java:300)\norg.bouncycastle.tls.TlsProtocol.safeReadRecord (TlsProtocol.java:891)\norg.bouncycastle.tls.TlsProtocol.readApplicationData (TlsProtocol.java:842)\norg.bouncycastle.jsse.provider.ProvSSLSocketWrap$AppDataInput.read (ProvSSLSocketWrap.java:801)\njava.io.SequenceInputStream.read (SequenceInputStream.java:198)\njava.io.BufferedInputStream.fill (BufferedInputStream.java:244)\njava.io.BufferedInputStream.read1 (BufferedInputStream.java:284)\njava.io.BufferedInputStream.read (BufferedInputStream.java:343)\n```","author":{"url":"https://github.com/ulrokx","@type":"Person","name":"ulrokx"},"datePublished":"2025-08-06T21:19:16Z","url":"https://github.com/bcgit/bc-java/issues/2142"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2f221b9d-3a95-dee2-ceb3-7ca2c9bd6d64
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB554:175A3:7598AE:9F3CE9:6AFBFB69
html-safe-nonce1c4ed522ad57214d615670e3b252801a74c868d6b3accf4818bade26da304611
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTU0OjE3NUEzOjc1OThBRTo5RjNDRTk6NkFGQkZCNjkiLCJ2aXNpdG9yX2lkIjoiNDg0ODYyMjg2ODk3MzIyMjc2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf7927b1b7aa64a6a5d9a7b5f762356d0d2c9950f584907dd4e7fa54f1c704e26
hovercard-subject-tagissue:3298113781
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/bcgit/bc-java/2142/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f4c9ed30eedaccaade2fe73e80ce9d42dbecdcd7ebbf9c7f3fb5916f29748776/bcgit/bc-java/issues/2142
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f4c9ed30eedaccaade2fe73e80ce9d42dbecdcd7ebbf9c7f3fb5916f29748776/bcgit/bc-java/issues/2142
og:image:altWhen the createSocket factory method is used with a non-null InputStream consumed argument, a SequenceInputStream is created. One consideration with using SequenceInputStream is the following After...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameulrokx
hostnamegithub.com
expected-hostnamegithub.com
Nonefa74413a1d84dac536fcca0740780bcbd3207bafec0e51873b73ff8e8cca032f
turbo-cache-controlno-preview
go-importgithub.com/bcgit/bc-java git https://github.com/bcgit/bc-java.git
octolytics-dimension-user_id4566970
octolytics-dimension-user_loginbcgit
octolytics-dimension-repository_id10416648
octolytics-dimension-repository_nwobcgit/bc-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id10416648
octolytics-dimension-repository_network_root_nwobcgit/bc-java
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb3b5633a74535d9c23385512d534c66c8fde1907
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/bcgit/bc-java/issues/2142#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbcgit%2Fbc-java%2Fissues%2F2142
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fbcgit%2Fbc-java%2Fissues%2F2142
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=bcgit%2Fbc-java
Reloadhttps://github.com/bcgit/bc-java/issues/2142
Reloadhttps://github.com/bcgit/bc-java/issues/2142
Reloadhttps://github.com/bcgit/bc-java/issues/2142
bcgithttps://github.com/bcgit
bc-javahttps://github.com/bcgit/bc-java
Codehttps://github.com/bcgit/bc-java
Issues47 (47)https://github.com/bcgit/bc-java/issues
Pull requests18 (18)https://github.com/bcgit/bc-java/pulls
Discussionshttps://github.com/bcgit/bc-java/discussions
Actionshttps://github.com/bcgit/bc-java/actions
Projectshttps://github.com/bcgit/bc-java/projects
Wikihttps://github.com/bcgit/bc-java/wiki
Security and qualityhttps://github.com/bcgit/bc-java/security
Insightshttps://github.com/bcgit/bc-java/pulse
https://github.com/bcgit/bc-java
New issuehttps://github.com/login?return_to=https://github.com/bcgit/bc-java/issues/2142
New issuehttps://github.com/login?return_to=https://github.com/bcgit/bc-java/issues/2142
createSocket with consumed InputStream and com.sun.net.ssl.requireCloseNotify throws SocketExceptionhttps://github.com/bcgit/bc-java/issues/2142#top
enhancementNew feature or requesthttps://github.com/bcgit/bc-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com/ulrokx
ulrokxhttps://github.com/ulrokx
on Aug 6, 2025https://github.com/bcgit/bc-java/issues/2142#issue-3298113781
SequenceInputStream is createdhttps://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/jsse/provider/ProvSSLSocketWrap.java#L593
https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/SequenceInputStream.htmlhttps://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/io/SequenceInputStream.html
TlsNoCloseNotifyException being thrownhttps://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/tls/TlsProtocol.java#L909
com.sun.net.ssl.requireCloseNotifyhttps://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/jsse/provider/JsseUtils.java#L79-L80
send our own close_notifyhttps://github.com/bcgit/bc-java/blob/main/tls/src/main/java/org/bouncycastle/tls/TlsProtocol.java#L880
https://github.com/peterdettman
peterdettmanhttps://github.com/peterdettman
on Aug 7, 2025https://github.com/bcgit/bc-java/issues/2142#issuecomment-3162423263
winfriedgerlachhttps://github.com/winfriedgerlach
enhancementNew feature or requesthttps://github.com/bcgit/bc-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
on Aug 12, 2025https://github.com/bcgit/bc-java/issues/2142#event-19113218299
Sign up for freehttps://github.com/signup?return_to=https://github.com/bcgit/bc-java/issues/2142
Sign in to commenthttps://github.com/login?return_to=https://github.com/bcgit/bc-java/issues/2142
enhancementNew feature or requesthttps://github.com/bcgit/bc-java/issues?q=state%3Aopen%20label%3A%22enhancement%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.