Comments (2)
@nulopes You need to call func (cc *Conn) NetConn() net.Conn to get underlined connection:
conn := c.NetConn()
if tlsCon, ok := conn.(*tls.Conn); ok {
peerCertificates := tlsCon.ConnectionState().PeerCertificates
if len(peerCertificates) > 0 {
...
}
}
if tlsCon, ok := conn.(*dtls.Conn); ok {
peerCertificates := tlsCon.ConnectionState().PeerCertificates
if len(peerCertificates) > 0 {
...
}
}
For example in our code: https://github.com/plgd-dev/hub/blob/72a50f0d1384ab77deb12432a9df8603b431f261/coap-gateway/service/service.go#L449
from go-coap.
Closing for no response.
from go-coap.
Related Issues (20)
- serve large message HOT 2
- preparing new v3 release HOT 4
- How to read raw UDP packet HOT 1
- TCP message bigger than 64kB HOT 2
- Resolve parallel request's to the same device endpoint
- Comment on SetObserve method is confusing HOT 1
- A problem with sending large amounts of data using UDP. HOT 2
- ListenAndServe complains about wrong arguments
- go install issue - go.mod has post-v3 module path at revision v3.0.0 HOT 1
- how do i do the tls / letsencrypt equivalent of a secure connection? HOT 1
- how do u do cookie sessions or cookies data sending in coap? HOT 3
- TCP doesn't work HOT 2
- Bidirectional examples missing HOT 2
- mux.Router can't handle root path or no path ("/") HOT 3
- Move from `pion/udp` to `pion/transport` HOT 3
- Support for Middlewares in mux Router HOT 5
- Consume `pion/dtls` connection ID support HOT 1
- Support serializing and deserializing a UDP DTLS connection HOT 2
- Implement Support for Separate Messages in Server HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-coap.