AuthenticationP14V2ClientImpl.Mesa
Copyright (C) 1986 by Xerox Corporation. All rights reserved.
Generated by Demers.pa at November 22, 1986 2:18:29 pm PST
using Sirocco [1.0] of September 25, 1986 3:44:23 am PDT
DIRECTORY
CrRPC,
TimeP15V2,
CHNameP2V0,
AuthenticationP14V2;
AuthenticationP14V2ClientImpl: CEDAR PROGRAM
IMPORTS CrRPC
EXPORTS AuthenticationP14V2 ~ {
OPEN AuthenticationP14V2;
Errors
CallError: PUBLIC ERROR [problem: AuthenticationP14V2.CallProblem, whichArg: AuthenticationP14V2.Which] ~ CODE;
AuthenticationError: PUBLIC ERROR [problem: AuthenticationP14V2.Problem] ~ CODE;
GetErrorProc
GetError: CrRPC.GetErrorProc ~ {
SELECT errNum FROM
1 => {
problem: AuthenticationP14V2.CallProblem;
whichArg: AuthenticationP14V2.Which;
problem ← VAL[CrRPC.GetCARDINAL[h]];
whichArg ← VAL[CrRPC.GetCARDINAL[h]];
ERROR CallError[problem, whichArg]
};
2 => {
problem: AuthenticationP14V2.Problem;
problem ← VAL[CrRPC.GetCARDINAL[h]];
ERROR AuthenticationError[problem]
};
ENDCASE => {
ERROR CrRPC.Error[h, remoteError, "Unexpected Remote Error"];
};
};
Remote Procedures
CheckSimpleCredentials: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords] RETURNS [ok: BOOLEAN] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
};
GetResults: CrRPC.GetResultsProc ~ {
ok ← CrRPC.GetBOOL[h];
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~2, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ChangeStrongKey: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords, newKey: AuthenticationP14V2.Block] RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
FOR i0: CARDINAL IN [0..4) DO
CrRPC.PutCARDINAL[h, newKey[i0]];
ENDLOOP;
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~4, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
DeleteStrongKey: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords, name: CHNameP2V0.ThreePartName] RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
CrRPC.PutROPE[h, name.organization];
CrRPC.PutROPE[h, name.domain];
CrRPC.PutROPE[h, name.object];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~5, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
CreateStrongKey: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords, name: CHNameP2V0.ThreePartName, key: AuthenticationP14V2.Block] RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
CrRPC.PutROPE[h, name.organization];
CrRPC.PutROPE[h, name.domain];
CrRPC.PutROPE[h, name.object];
FOR i0: CARDINAL IN [0..4) DO
CrRPC.PutCARDINAL[h, key[i0]];
ENDLOOP;
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~3, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
ChangeSimpleKey: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords, newKey: CARDINAL] RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, newKey];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~7, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
DeleteSimpleKey: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords, name: CHNameP2V0.ThreePartName] RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
CrRPC.PutROPE[h, name.organization];
CrRPC.PutROPE[h, name.domain];
CrRPC.PutROPE[h, name.object];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~8, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
CreateSimpleKey: PUBLIC PROC [h: CrRPC.Handle, credentials: AuthenticationP14V2.Credentials, verifier: AuthenticationP14V2.SeqWords, name: CHNameP2V0.ThreePartName, key: CARDINAL] RETURNS [] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutCARDINAL[h, ORD[credentials.type]];
CrRPC.PutCARDINAL[h, credentials.value.length];
FOR i0: CARDINAL IN [0..credentials.value.length) DO
CrRPC.PutCARDINAL[h, credentials.value.body[i0]];
ENDLOOP;
CrRPC.PutCARDINAL[h, verifier.length];
FOR i0: CARDINAL IN [0..verifier.length) DO
CrRPC.PutCARDINAL[h, verifier.body[i0]];
ENDLOOP;
CrRPC.PutROPE[h, name.organization];
CrRPC.PutROPE[h, name.domain];
CrRPC.PutROPE[h, name.object];
CrRPC.PutCARDINAL[h, key];
};
GetResults: CrRPC.GetResultsProc ~ {
NULL
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~6, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
GetStrongCredentials: PUBLIC PROC [h: CrRPC.Handle, initiator: CHNameP2V0.ThreePartName, recipient: CHNameP2V0.ThreePartName, nonce: CARD] RETURNS [encryptedCredentialsPackage: AuthenticationP14V2.SeqWords] ~ {
PutArgs: CrRPC.PutArgsProc ~ {
CrRPC.PutROPE[h, initiator.organization];
CrRPC.PutROPE[h, initiator.domain];
CrRPC.PutROPE[h, initiator.object];
CrRPC.PutROPE[h, recipient.organization];
CrRPC.PutROPE[h, recipient.domain];
CrRPC.PutROPE[h, recipient.object];
CrRPC.PutCARD[h, nonce];
};
GetResults: CrRPC.GetResultsProc ~ {
{
length1: CARDINAL ~ CrRPC.GetCARDINAL[h];
encryptedCredentialsPackage ← NEW[AuthenticationP14V2.SeqWordsObject[length1]];
FOR i0: CARDINAL IN [0..length1) DO
encryptedCredentialsPackage.body[i0] ← CrRPC.GetCARDINAL[h];
ENDLOOP;
};
};
CrRPC.Call[h~h, remotePgm~14, remotePgmVersion~2, remoteProc~1, putArgs~PutArgs, getResults~GetResults, getError~GetError];
};
}...