(conn net.Conn)
| 51 | } |
| 52 | |
| 53 | func GetTLSSessionID(conn net.Conn) (TLSSessionID, bool) { |
| 54 | tagger, ok := conn.(ConnTagger) |
| 55 | if !ok { |
| 56 | if netconner, ok := conn.(interface { |
| 57 | NetConn() net.Conn |
| 58 | }); ok { |
| 59 | return GetTLSSessionID(netconner.NetConn()) |
| 60 | } |
| 61 | return TLSSessionID{}, false |
| 62 | } |
| 63 | return getTLSSessionID(tagger) |
| 64 | } |
| 65 | |
| 66 | func TLSSessionIDToContext(ctx context.Context, conn net.Conn) context.Context { |
| 67 | return context.WithValue(ctx, connKey{}, conn) |
no test coverage detected