Commit Graph

28 Commits

Author SHA1 Message Date
antiduh
5f3fd64169 Rough implementation of impersonation. 2014-06-25 20:12:46 +00:00
antiduh
9118815314 Forgot to commit the stub class 2014-06-25 02:49:54 +00:00
antiduh
95195f1214 Working on implementing impersonation. 2014-06-25 02:49:25 +00:00
antiduh
ade72b32f4 Implement the context-completion check I've had sitting half done. 2014-06-25 02:00:05 +00:00
antiduh
14d8ad5db7 Now with consistent namespaces and using statement sorting. 2014-06-25 01:48:52 +00:00
antiduh
1577d2de66 More reliability contracts for CERs. 2014-06-25 01:30:03 +00:00
antiduh
e274ce06eb Reduce methods visibility 2014-06-25 01:28:15 +00:00
antiduh
3ee755128f More CER goodness. 2014-06-25 01:26:59 +00:00
antiduh
26888a8b7b Create a similar SafeDecryptMessage that handles the CER crud.
Change the Safe*Message methods to order the parameters the same (even though the Win32 API doesn't..) and to take in the SecureBufferAdapter instead of its handle.
2014-06-25 01:08:29 +00:00
antiduh
2b52e1d84f Helper method for invoking native methods with a CER. 2014-06-24 22:57:02 +00:00
antiduh
8837f3e95c Implemented CERs for encryption and decryption. 2014-06-24 22:51:38 +00:00
antiduh
28a3835060 No need to manually delete the context handle, it's under a safe handle now. 2014-06-24 22:01:26 +00:00
antiduh
56e48dc65d Cleaned up code style and comments 2014-06-24 21:35:32 +00:00
antiduh
970c0f2bfa Moved the safe handles for credentials and contexts into their own file. 2014-06-24 20:21:09 +00:00
antiduh
508cd9df49 Move credential native methods to their own file. Create a QueryNameSupport.cs file to hold a couple classes related to implementing that functionality. 2014-06-24 20:19:58 +00:00
antiduh
6b3e395f7c Implemented SafeHandle usage for Context et al. The usage isn't actually safe yet, since I still reference the rawHandle without doing safe (CER) reference counting on the handle. 2014-06-24 19:41:19 +00:00
antiduh
fe14836949 Fixed Credential using a fixed-size 64-bit handle; it's always 2 pointers.
Reworked the Credential handle into a SafeCredentialHandle. We still use references to the raw handle, which is unsafe, but I will hopefully rework that soon.
2014-06-24 03:01:53 +00:00
antiduh
3ac7fb5ec8 Initial implementation of EncryptMessage and DecryptMessage. 2014-06-23 21:50:12 +00:00
antiduh
9785183f31 Added support for querying the context's user name and authority. Still working my way up to EncryptMessage. 2014-06-23 18:30:26 +00:00
antiduh
1be2b9c7ef Saving work.. working on implementing EncryptMessage. The buffer types and allocation that get passed to the call is really crazy in the sample. 2014-06-23 02:34:36 +00:00
antiduh
3142cfff7b Fixed ServerContext to store its final attributes. 2014-06-23 02:33:47 +00:00
antiduh
93bdd38729 A little cleaner, and we can complete negotiation. 2014-06-23 00:13:50 +00:00
antiduh
352e4d18fc Working on implementing the ServerContext and structuring things so that invoking the public interface is a little easier - trying to move out of proof-of-concept code to prototype code. Still need to rework how I deal with the context and credential handles, worried that they're not treated safe. Still need to reorganize a lot of where code lives. Very inconsistent so far. 2014-06-22 16:20:10 +00:00
antiduh
a079449f85 Changed how internal structures are created for handling SecureBuffers. 2014-06-22 03:35:47 +00:00
antiduh
1c5849ba94 Moved the secure buffer code to its own folder. 2014-06-22 00:43:47 +00:00
antiduh
c64765fbdf I can now successfully call InitializeSecurityContext and get a status of ContinueNeeded. 2014-06-21 16:32:34 +00:00
antiduh
0655259f46 Rough capture of the options to InitializeSecurityContext (used by clients) and AcceptSecurityContext (used by servers). Some of the options are used only by clients (prefaced by init) and some are only used by servers (prefaced by Accept). It might be worth to either separate the two sets by client options and server options, or unifying the sets in the public interface, and translating to the correct values when actually calling ISC or ASC. 2014-06-20 18:06:33 +00:00
antiduh
cfba81cfe2 Working on some of the fundamentals of the Context side of things. The Win 32 API is very wonky here though. Going to take some time. 2014-06-19 21:53:34 +00:00