This file is indexed.

/usr/include/root/TSSLSocket.h is in libroot-net-dev 5.34.30-0ubuntu8.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
// @(#)root/net:$Id: TSSLSocket.h
// Author: Alejandro Alvarez 16/09/2011

/*************************************************************************
 * Copyright (C) 1995-2011, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TSSLSocket
#define ROOT_TSSLSocket

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TSSLSocket                                                           //
//                                                                      //
// A TSocket wrapped in by SSL.                                         //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TSocket
#include "TSocket.h"
#endif

typedef struct ssl_st     SSL;
typedef struct ssl_ctx_st SSL_CTX;

class TSSLSocket : public TSocket {
protected:
   TSSLSocket() : TSocket() {}

private:
   // CA, client cert/key... are class properties
   static char fgSSLCAFile[];
   static char fgSSLCAPath[];
   static char fgSSLUCert[];
   static char fgSSLUKey[];

   // Object properties
   SSL_CTX *fSSLCtx;
   SSL     *fSSL;

   void WrapWithSSL();

public:
   TSSLSocket(TInetAddress addr, const char *service, Int_t tcpwindowsize = -1);
   TSSLSocket(TInetAddress addr, Int_t port, Int_t tcpwindowsize = -1);
   TSSLSocket(const char *host, const char *service, Int_t tcpwindowsize = -1);
   TSSLSocket(const char *url, Int_t port, Int_t tcpwindowsize = -1);
   TSSLSocket(const char *sockpath);
   TSSLSocket(Int_t desc);
   TSSLSocket(Int_t desc, const char *sockpath);
   TSSLSocket(const TSSLSocket &s);
   virtual ~TSSLSocket();

   void  Close(Option_t *option="");

   // Set up the SSL environment for the next instantiation
   static void SetUpSSL(const char *cafile, const char *capath,
                        const char *ucert,  const char *ukey);

   // The rest of the Send and Recv calls rely ultimately on these,
   // so it is enough to overload them
   Int_t Recv(TMessage *&mess);
   Int_t RecvRaw(void *buffer, Int_t length, ESendRecvOptions opt = kDefault);
   Int_t Send(const TMessage &mess);
   Int_t SendRaw(const void *buffer, Int_t length,
                 ESendRecvOptions opt = kDefault);

   // Issue with hidden method :(
   Int_t Send(Int_t kind)                                  { return TSocket::Send(kind); }
   Int_t Send(Int_t status, Int_t kind)                    { return TSocket::Send(status, kind); }
   Int_t Send(const char *mess, Int_t kind = kMESS_STRING) { return TSocket::Send(mess, kind); }
   Int_t Recv(Int_t &status, Int_t &kind)                  { return TSocket::Recv(status, kind); }
   Int_t Recv(char *mess, Int_t max)                       { return TSocket::Recv(mess, max); }
   Int_t Recv(char *mess, Int_t max, Int_t &kind)          { return TSocket::Recv(mess, max, kind); }

   ClassDef(TSSLSocket,0)  // SSL wrapped socket
};

#endif