Refactor client-side GSS negotiation loop

Use a subroutine for the loop body, making memory management and
tracking of which variables are used where much cleaner.

Change-Id: I4a8f7922b2e1cc736a733959b11c8aa6a95924f6
Pull server principal and remote address out of get_token

They're still hardcoded parameters, but will be easier to change
in the future.

Change-Id: I49e7aec78de13d7ba426e48db52018e69574a3a2
Wordsmith get_token_round_trip comment

Change-Id: I6a648537c33afd2ab799a610c43fce48d89ac2ac
Include rxgk.h in security-class files

We'll need these prototypes eventually.

Note that gssapi.h is currently a prerequisite of rxgk.h, which should
be removed eventually.

Change-Id: Ic2fd4b33272f0aded0746f5fed468a4ee2453909
rxgk_NewServerSecurityClass

Not usable, as no functions implement the rxgk_getkey_func type yet.

Change-Id: Iab544886cb8a3531edd5cf0841b1d351fa2ce050
dummy_getkey to implement rxgk_getkey_func

We already did most of the work in rxgk_crypto.

Change-Id: I660f5cfcbf7271309f74ebf16b2e8d406b01dd04
Register an RXGK security object for rxgkd

Use the dummy getkeyfunction and the NewServerSecurityObject function
to populate rxgk's slot in the array of security objects.

Change-Id: I07b905908401081e98192f46a00c4b3d6f622d0a
Add rxgk_NewClientSecurityObject

Store the key, token, etc. in the class-private data.

Change-Id: I52f029483212bd9614d08696f730628ebbdb2277
Security index must be parameter to get_token

Since we're passing in a security object, we need to know which
index to use...

Change-Id: Ic173091ba9bb99e865c4d0d4acb127fa06505189
Return more things from get_token

Like, say, the token itself, as well as some tokeninfo and the
token master key.

Change-Id: I53bb5b7c2949562c09036ec8b2945d426ced4ce3
We need an rxgk_key back from get_token

Not just an RXGK_Data.

Change-Id: Icab3f8114730cc28f03c3831279052a3f210991a
Client security object doesn't need a kvno

Only the server needs to care, I think.

Probably means we don't need to track enctype, either, as that is
tracked within the rxgk_key, but leave it for now.

Change-Id: I1102da7cb93f68115a7ddd3c38e3d58c9e5cf720
Get a token over an rxgk connection

We call through our dummy methods that always return success.
Now we can start making them not-dummy!

Change-Id: Icd6f9d64f737b02e858bcae7fcc6c008e6ddf377
Data structures for per-connection security data

Also tidy up other comments.

Change-Id: I8f0ca07580090a1857e5412d069dd04acd128294
Include a union for security object privateData

We have client and server versions, but alias them for the first
field, which specifies which type is in use.
The union lets this aliasing be more correct by the standard.

Change-Id: I6581cbdd9ec4aed943b7361b39526727153cb5d5
Create and destroy connections

Destroy the security object on last close.

Change-Id: Iee79f072bccd202db658771cf1e5d29c0c411761
rxgk_server: check auth, get/create challenge

Using a random nonce brings in hcrypto.
We don't check the response (and the client drops it on the floor),
so nothing new yet.

Change-Id: I88905e42c31b70379aaf4a85ac642eb9b6a92ee9
Add copy_rxgkdata

A utility function to allocate and copy data from one RXGK_Data to another.

Change-Id: I13055027fa986158dbce5391f88391f5ba24755a
The token is just data, not an array of the same

One data blob contains the token.

Change-Id: I479e097a202f96f9df4aea6c120b792d35951ba5
The fixed-length nonce is encoded straightforwardly

Change-Id: I40f17035da77fe8c64c075f5a33745a358272375