TUN-1064: Revert OriginCert capnp changes in Cloudflared. Reverts

commits a1ee2342e97 and 8c756c45785.
This commit is contained in:
Adam Chalmers 2018-10-02 11:54:41 -05:00
parent 0b78db185b
commit 65d232efda
3 changed files with 89 additions and 108 deletions

View File

@ -32,7 +32,6 @@ type TunnelRegistration struct {
LogLines []string
PermanentFailure bool
TunnelID string `capnp:"tunnelID"`
OriginCert []byte `capnp:"originCert"`
}
func MarshalTunnelRegistration(s tunnelrpc.TunnelRegistration, p *TunnelRegistration) error {

View File

@ -19,8 +19,6 @@ struct TunnelRegistration {
permanentFailure @3 :Bool;
# Displayed to user
tunnelID @4 :Text;
# Certificate that authorizes the origin to run tunnels on the given url.
originCert @5 :Data;
}
struct RegistrationOptions {

View File

@ -124,12 +124,12 @@ type TunnelRegistration struct{ capnp.Struct }
const TunnelRegistration_TypeID = 0xf41a0f001ad49e46
func NewTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) {
st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 5})
st, err := capnp.NewStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4})
return TunnelRegistration{st}, err
}
func NewRootTunnelRegistration(s *capnp.Segment) (TunnelRegistration, error) {
st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 5})
st, err := capnp.NewRootStruct(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4})
return TunnelRegistration{st}, err
}
@ -233,26 +233,12 @@ func (s TunnelRegistration) SetTunnelID(v string) error {
return s.Struct.SetText(3, v)
}
func (s TunnelRegistration) OriginCert() ([]byte, error) {
p, err := s.Struct.Ptr(4)
return []byte(p.Data()), err
}
func (s TunnelRegistration) HasOriginCert() bool {
p, err := s.Struct.Ptr(4)
return p.IsValid() || err != nil
}
func (s TunnelRegistration) SetOriginCert(v []byte) error {
return s.Struct.SetData(4, v)
}
// TunnelRegistration_List is a list of TunnelRegistration.
type TunnelRegistration_List struct{ capnp.List }
// NewTunnelRegistration creates a new list of TunnelRegistration.
func NewTunnelRegistration_List(s *capnp.Segment, sz int32) (TunnelRegistration_List, error) {
l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 5}, sz)
l, err := capnp.NewCompositeList(s, capnp.ObjectSize{DataSize: 8, PointerCount: 4}, sz)
return TunnelRegistration_List{l}, err
}
@ -1322,94 +1308,92 @@ func (p TunnelServer_unregisterTunnel_Results_Promise) Struct() (TunnelServer_un
return TunnelServer_unregisterTunnel_Results{s}, err
}
const schema_db8274f9144abc7e = "x\xda\x9cV]\x88\x14W\x16>\xdf\xbd\xddS=2" +
"cOQ-h\xb32 #\xfe\xe0\xb8\xba\xea2\xce" +
"\xfe\xcc\xcf\x8e.=;\x8e}m\xddu\xd5\x05\xcb\xee" +
"k[\xb3\xddUMU\xb5\xab\x82?\xc8\xc2\xb2\xb2+" +
"\xbb\xab\xc2\xea\xe2\xa2\x92\xbc\xe4!?\xe4!\x18&`" +
" \x89\x09F\xccC\x12\x94\x08!\x91yP\x12$C" +
"\xf2\x90@\xa8p\xab\xa7\xba\xcb\xd1\xa8\xc9\xdb\xed\xef\x9e" +
"{\xcewN\x9d\xf3\x9d^\xb5\x84\x0f\xb2\xd5\xc9\x8f\x93" +
"Db$\xd9\x16\xfc\xb2z\xe3\xd2\xcf\xcf\\\xfb+\xe9" +
"Y\x16\x1c\x99\x1c\xcd|\xed\x1f\xff\x88\x08k>`\x87" +
"`\xdce\x1a\x911\xc56\x13\x82\x1b+&_\xfd\xd7" +
"\xcb\x7f\xfb\x1f\x89%\x00QB#Z\xf3-\xfb\x06\x04" +
"C\xe7\x03\x84\xe0\xf4\xcd\xd7\xc6\xab\xff>w\x89\xf4%" +
"\xd1\xfdz\xce\x18%\x82y9\xdc\xbe\xb2:\xf1J\xe3" +
"&\xc9\xd5U/\xbf\xa7\x9e\x0e\xf1\x17\x08\xc1\xc2\xcf\x87" +
";\xed\xfb\xc7\xaf\x90\x9eE\x8bE\xc3\xf0\x13>\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\xce\x9b\xe9\x90rG\x93\xf2\x86\x1dj\xc2" +
"8D\x9eA\x072jf\xf4M\xa3Db\x8cCl" +
"g\xd0\x19\xcb\x84e\xdd6L$\xf2\x1cb\x17C\xe0" +
"\xb8V\xd9\xb2\x7f#\x89\xbb>:\x89\xa1\x93\x10\xecs" +
"<\xdf6\xab\x92\x88\xd0A\x0c\x1d\x84\xa3N\xcd\xb7\x1c" +
"\xdbCWk\x1e\x08\xe8\x8a\x95\xe0\x11\x1fx\xa8\xee\xef" +
"\x93\xb6o\x15M\xf5\x98(\xfc\xb6-\xca\x8b\x88\xc4 " +
"\x87\x18\x8bQ\xce\xfd,\x96GDy\xd3\x9eV\x1e\xda" +
"\x9f\xe5\xc1\x88U\xb7\xac\x9aV%\xfa\x15%3D\xda" +
"\xefZ6\x8f\xe3\xb7%\xac\xaa\x1b\xb2\xdb\\\xeb\x0e3" +
"T\x1cWD\x1c\x8d\xc5\x18%*\xf4\x80\xa3\xb0\x0a-" +
"\x9aF/\x86\x89\x0aK\x15\xbe\x16-\xa6\xc6jd\x89" +
"\x0a+\x14\xde\x07\x06\xf0\x0c8\x91\xb1\x0e\xcf\x11\x15\xfa" +
"\x14<\xa2\xcc\x13<\x83\x04\x911\x14\xba\x1fT\xf8\x98" +
"\xc2\x93\x89\x0c\x92DF\x0e\xcb\x89\x0a#\x0a\xdf\xad\xf0" +
"6\x96A\x1b\x91\xf1'L\x10\x15v)|\x9f\xc2\xb5" +
"dF\x8d\xa8!\xe1\x12\x15J\x0a\xaf)<5?\x83" +
"\x14\x91Q\x0d\xf1\x8a\xc2\x0f(\xbc}A\x06\xedDF" +
"\x1d\xc7\x89\x0a\xbe\xc2\x8f)|\x0e2\x98Cd\x1c\xc6" +
"9\xa2\xc21\x85\xff\x03\x0cA\xb1bI\xdb\xcf\x95\xe2" +
"\x9d\xb0_\xba\x9e\xe5\xd8\xd1o\xeex\xcdR\xcb\x99\x81" +
"F\xa3M\xf3NZM4\xd2-\xd9' M\x08j" +
"\x8eS\x19\x7f\xb0\xc3\xd2\xbeY\xf60\x97\x90\xe7@W" +
"KF\x09\x0a\x0c\xc2y/\xfa\x16\xa5\x1d;WB\x1b" +
"1\xb45?\xf9\x98C\xddE\xb3\x92\xab5\x99X\xde" +
"P\xddw\xea5\xea.\x99\xbe,\x01\xc4\x00B\xe0\xd6" +
"\xed\x8d\xaeS\xdd\x0a\xe9V-\xdb\xacP\xf3\xa6\xe8T" +
"k\xae\xf4<X\x8e-\xeaf\xc5\xe2\xfeA\xb4\x13C" +
"{\xac\x87\xd8\xec\x1e\xea\xae\xf5o5\xcb\xaagR\xcd" +
"\xbe^\xb6\x9cH\xf4p\x88U\xb1\xbe\xeeU}\xbd\x94" +
"C\xaceH\xab\xe1j\xf6\xf0~\xb3R\x97\x0fu\xeb" +
"\x93T\xac,\xfd\xc6)g\xefuz\xf2\xa6\xab\x99U" +
"\xefG\xbe\xde\"\xbd\xb4\x12\xa3\xb8\x02\xf6\x13\x89\x14\x87" +
"\xc80\x0c\xb8\xa1V\xa1\xab\xb5%f\x8d>\xff\xbep" +
"\x03\x8d(\x8d\xb9O\x125W3\xa2\x8d\xa4\x8bC\xc4" +
"\xf4\x9c\x86\xd66D\xb4\xfc\xf4_\xb9\xc4\xf4u\x1aX" +
"\xf3\xdf\x00\xa2\xad\xaf/;AL_\xac\x05\x912\xd2" +
"@#\xe4 \x82(;\xea\x0e\xf3\x1bD\x10\xc9/\"" +
"\x05%\x1aD\x1eO_\xee\x87\xd4\xbb\xdb{\x9a\x8aE" +
"\xab\xf2\xc9\xf5j\xc4I+\xbe\xaaZ1\xbf\x13D\xa2" +
"\x83C\xccg\x08*\xce\x8c\x94\xa6\xc7c-\xf48\x89" +
"k\x10\x8e\x84.\xad\x1e+\xff\xf3\x9b\xfe\xcf*\x15>" +
"\xcd!.\xc4\xba\xf5\xbc\x02\xff\xcb!\x9e\x89\xa9\xf0E" +
"\xb5M.p\x88\xc9\xa6\xb0\xe9\x97O\x10\x89I\x0e\xf1" +
"vK\xd5\xf47\x95\xe1\x1b\x1c\xe2\xbd\x96\xa4\xe9\xd7\xd5" +
"\x82z\x97C\xdcd\xd0\xa4\xebF\xe4\xb5\xba\xdbR\xf0" +
"\x8aS\x1e\xb3l\xe9)]\x98\x91\x02u\xa5\x04\xa0&" +
"\xdd\xaaiK\x1b\xfeF\xd3\xaa\xd4]I\xad\xd9m$" +
"\x9d\x1b\x89\xc9\xc9#7\xdbw\x01\x00\x00\xff\xff\xd0\x91" +
"\xc3p"
const schema_db8274f9144abc7e = "x\xda\x9cV]\x8c\x14\xd5\x12\xae\xef\x9c\x99\xedY\xb2" +
"\xcbl\xa7\x87\\\x98\\2\x09Y\xc2OX.\\\xe0" +
"f\xd9{\xaf\xfb\xe3\x82\x99uY\xa6\x190\x08\x98\xd0" +
"\xcc\x1c\x86^{\xba'\xdd=\x08D~$\x18\x95(" +
"Q\x91\x071\x18$1Qc\xfc\x89&\x06\x83\x09\xbe" +
"H\x0c1\xbc\xa8\x91Hb\x94\xec\x03DC\xdc\xe8\x83" +
"&\xa6\xcd\xe9\xd9\x9ei\x16\x05\xf4\xed\xccw\xeaT}" +
"U]\xf5\xd5,\xfb\x07\x1f`\xcb\x93\xdf$\x89\xf4\xe1" +
"d[\xf0\xbf\xea\xa53\xff9q\xf1\x08\xa9Y\x16\x1c" +
"87\x92\xf9\xc5?\xfc5\x11V|\xc1\xf6A\xbb\xc6" +
"\x14\"m\x82\xad'\x04\x97\x96\x9c\xfb\xf0\xd9\xf7\x9ex" +
"\x89\xf4\x05\x00QB!Z\xf1\x1b\xfb\x15\x04M\xe5\xfd" +
"\x84\xe0\x85\xaf>\x1a\xab>w\xf2\x0c\xa9\x0b\xa2\xfb\xd5" +
"\x9c1J\x04\xb3\xf2\xb8r~y\xe2\x83\xc6M\x92\xcb" +
"\xab\x1e~]>\x1d\xe4o\x13\x82\xb9?\x0cu\xda7" +
"\x0e\x9f'5\x8b\x16\x8b\x86\xe1\xb7|\x04\xda\xcf\xf2\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"X[Ne\xd4\xb4\x85'%`j\xea\xe5\x95\x9c\xf5" +
"\x9ap\xab\x86-l\xf8k\x0d\xd3\xaa\xbb\x82Zc\xda" +
"\xc8/?\x1cS\x8e\xdf\x03\x00\x00\xff\xff#\xa3\xb8\x8f"
func init() {
schemas.Register(schema_db8274f9144abc7e,