Adding challenge/response authentication to network protocol. Build is currently broken until gsasl integration is complete.
This commit is contained in:
+49
-33
@@ -25,6 +25,7 @@ BEGIN
|
||||
|
||||
PokerTHMessage ::= CHOICE {
|
||||
initMessage InitMessage,
|
||||
authMessage AuthMessage,
|
||||
initAckMessage InitAckMessage,
|
||||
avatarRequestMessage AvatarRequestMessage,
|
||||
avatarReplyMessage AvatarReplyMessage,
|
||||
@@ -83,33 +84,48 @@ Version ::= SEQUENCE {
|
||||
}
|
||||
|
||||
AnonymousLogin ::= SEQUENCE {
|
||||
playerName UTF8String (SIZE(1..32)),
|
||||
}
|
||||
|
||||
-- Login data is according to SCRAM SHA-1
|
||||
AuthenticatedLogin ::= SEQUENCE {
|
||||
clientUserData OCTET STRING (SIZE(1..256)),
|
||||
avatar AvatarHash OPTIONAL
|
||||
}
|
||||
|
||||
-- TODO challenge/response
|
||||
AuthenticatedLogin ::= SEQUENCE {
|
||||
playerName UTF8String (SIZE(1..32)),
|
||||
password UTF8String (SIZE(1..32)),
|
||||
avatar AvatarHash OPTIONAL
|
||||
AuthMessage ::= [APPLICATION 1] CHOICE {
|
||||
authServerChallenge [0] AuthServerChallenge,
|
||||
authClientResponse [1] AuthClientResponse,
|
||||
authServerVerification [2] AuthServerVerification
|
||||
}
|
||||
|
||||
AuthServerChallenge ::= SEQUENCE {
|
||||
serverChallenge OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
AuthClientResponse ::= SEQUENCE {
|
||||
clientResponse OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
AuthServerVerification ::= SEQUENCE {
|
||||
serverVerification OCTET STRING (SIZE(1..256))
|
||||
}
|
||||
|
||||
StatisticsLogin ::= SEQUENCE {
|
||||
}
|
||||
|
||||
InitAckMessage ::= [APPLICATION 1] SEQUENCE {
|
||||
InitAckMessage ::= [APPLICATION 2] SEQUENCE {
|
||||
latestGameVersion Version,
|
||||
latestBetaRevision INTEGER(0..65535),
|
||||
yourSessionId Guid,
|
||||
yourPlayerId NonZeroId
|
||||
}
|
||||
|
||||
AvatarRequestMessage ::= [APPLICATION 2] SEQUENCE {
|
||||
AvatarRequestMessage ::= [APPLICATION 3] SEQUENCE {
|
||||
requestId NonZeroId,
|
||||
avatar AvatarHash
|
||||
}
|
||||
|
||||
AvatarReplyMessage ::= [APPLICATION 3] SEQUENCE {
|
||||
AvatarReplyMessage ::= [APPLICATION 4] SEQUENCE {
|
||||
requestId NonZeroId,
|
||||
avatarResult CHOICE {
|
||||
avatarHeader [0] AvatarHeader,
|
||||
@@ -142,7 +158,7 @@ NetAvatarType ::= ENUMERATED {
|
||||
avatarImageGif (3)
|
||||
}
|
||||
|
||||
PlayerListMessage ::= [APPLICATION 4] SEQUENCE {
|
||||
PlayerListMessage ::= [APPLICATION 5] SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
playerListNotification ENUMERATED {
|
||||
playerListNew (0),
|
||||
@@ -150,7 +166,7 @@ PlayerListMessage ::= [APPLICATION 4] SEQUENCE {
|
||||
}
|
||||
}
|
||||
|
||||
GameListMessage ::= [APPLICATION 5] SEQUENCE {
|
||||
GameListMessage ::= [APPLICATION 6] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gameListNotification CHOICE {
|
||||
gameListNew [0] GameListNew,
|
||||
@@ -191,11 +207,11 @@ NetGameMode ::= ENUMERATED {
|
||||
gameClosed (3)
|
||||
}
|
||||
|
||||
PlayerInfoRequestMessage ::= [APPLICATION 6] SEQUENCE {
|
||||
PlayerInfoRequestMessage ::= [APPLICATION 7] SEQUENCE {
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
PlayerInfoReplyMessage ::= [APPLICATION 7] SEQUENCE {
|
||||
PlayerInfoReplyMessage ::= [APPLICATION 8] SEQUENCE {
|
||||
playerId NonZeroId,
|
||||
playerInfoResult CHOICE {
|
||||
playerInfoData [0] PlayerInfoData,
|
||||
@@ -218,14 +234,14 @@ UnknownPlayerInfo ::= SEQUENCE {
|
||||
|
||||
-- The following request will not be confirmed by the server. It is used,
|
||||
-- optionally, to reduce server traffic. The server might ignore it.
|
||||
SubscriptionRequestMessage ::= [APPLICATION 8] SEQUENCE {
|
||||
SubscriptionRequestMessage ::= [APPLICATION 9] SEQUENCE {
|
||||
subscriptionAction ENUMERATED {
|
||||
unsubscribeGameList (1),
|
||||
resubscribeGameList (2)
|
||||
}
|
||||
}
|
||||
|
||||
JoinGameRequestMessage ::= [APPLICATION 9] SEQUENCE {
|
||||
JoinGameRequestMessage ::= [APPLICATION 10] SEQUENCE {
|
||||
joinGameAction CHOICE {
|
||||
joinExistingGame [0] JoinExistingGame,
|
||||
joinNewGame [1] JoinNewGame
|
||||
@@ -241,7 +257,7 @@ JoinNewGame ::= SEQUENCE {
|
||||
gameInfo NetGameInfo
|
||||
}
|
||||
|
||||
JoinGameReplyMessage ::= [APPLICATION 10] SEQUENCE {
|
||||
JoinGameReplyMessage ::= [APPLICATION 11] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
joinGameResult CHOICE {
|
||||
joinGameAck [0] JoinGameAck,
|
||||
@@ -283,7 +299,7 @@ NetGameInfo ::= SEQUENCE {
|
||||
manualBlinds SEQUENCE SIZE(0..30) OF INTEGER(1..20001)
|
||||
}
|
||||
|
||||
GamePlayerMessage ::= [APPLICATION 11] SEQUENCE {
|
||||
GamePlayerMessage ::= [APPLICATION 12] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gamePlayerNotification CHOICE {
|
||||
gamePlayerJoined [0] GamePlayerJoined,
|
||||
@@ -322,51 +338,51 @@ RemovedFromGame ::= SEQUENCE {
|
||||
}
|
||||
}
|
||||
|
||||
KickPlayerRequestMessage ::= [APPLICATION 12] SEQUENCE {
|
||||
KickPlayerRequestMessage ::= [APPLICATION 13] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId
|
||||
}
|
||||
|
||||
LeaveGameRequestMessage ::= [APPLICATION 13] SEQUENCE {
|
||||
LeaveGameRequestMessage ::= [APPLICATION 14] SEQUENCE {
|
||||
gameId NonZeroId
|
||||
}
|
||||
|
||||
StartEventMessage ::= [APPLICATION 14] SEQUENCE {
|
||||
StartEventMessage ::= [APPLICATION 15] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
fillWithComputerPlayers BOOLEAN
|
||||
}
|
||||
|
||||
StartEventAckMessage ::= [APPLICATION 15] SEQUENCE {
|
||||
StartEventAckMessage ::= [APPLICATION 16] SEQUENCE {
|
||||
gameId NonZeroId
|
||||
}
|
||||
|
||||
GameStartMessage ::= [APPLICATION 16] SEQUENCE {
|
||||
GameStartMessage ::= [APPLICATION 17] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
startDealerPlayerId NonZeroId,
|
||||
playerSeats SEQUENCE SIZE(2..10) OF NonZeroId
|
||||
}
|
||||
|
||||
HandStartMessage ::= [APPLICATION 17] SEQUENCE {
|
||||
HandStartMessage ::= [APPLICATION 18] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
yourCard1 Card,
|
||||
yourCard2 Card,
|
||||
smallBlind INTEGER(1..20001)
|
||||
}
|
||||
|
||||
PlayersTurnMessage ::= [APPLICATION 18] SEQUENCE {
|
||||
PlayersTurnMessage ::= [APPLICATION 19] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId,
|
||||
gameState NetGameState
|
||||
}
|
||||
|
||||
MyActionRequestMessage ::= [APPLICATION 19] SEQUENCE {
|
||||
MyActionRequestMessage ::= [APPLICATION 20] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gameState NetGameState,
|
||||
myAction NetPlayerAction,
|
||||
myRelativeBet INTEGER(0..10000000)
|
||||
}
|
||||
|
||||
YourActionRejectedMessage ::= [APPLICATION 20] SEQUENCE {
|
||||
YourActionRejectedMessage ::= [APPLICATION 21] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
gameState NetGameState,
|
||||
yourAction NetPlayerAction,
|
||||
@@ -378,7 +394,7 @@ YourActionRejectedMessage ::= [APPLICATION 20] SEQUENCE {
|
||||
}
|
||||
}
|
||||
|
||||
PlayersActionDoneMessage ::= [APPLICATION 21] SEQUENCE {
|
||||
PlayersActionDoneMessage ::= [APPLICATION 22] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playerId NonZeroId,
|
||||
gameState NetGameState,
|
||||
@@ -389,24 +405,24 @@ PlayersActionDoneMessage ::= [APPLICATION 21] SEQUENCE {
|
||||
minimumRaise INTEGER(0..10000000) -- TODO
|
||||
}
|
||||
|
||||
DealFlopCardsMessage ::= [APPLICATION 22] SEQUENCE {
|
||||
DealFlopCardsMessage ::= [APPLICATION 23] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
flopCard1 Card,
|
||||
flopCard2 Card,
|
||||
flopCard3 Card
|
||||
}
|
||||
|
||||
DealTurnCardMessage ::= [APPLICATION 23] SEQUENCE {
|
||||
DealTurnCardMessage ::= [APPLICATION 24] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
turnCard Card
|
||||
}
|
||||
|
||||
DealRiverCardMessage ::= [APPLICATION 24] SEQUENCE {
|
||||
DealRiverCardMessage ::= [APPLICATION 25] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
riverCard Card
|
||||
}
|
||||
|
||||
AllInShowCardsMessage ::= [APPLICATION 25] SEQUENCE {
|
||||
AllInShowCardsMessage ::= [APPLICATION 26] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
playersAllIn SEQUENCE SIZE(1..10) OF PlayerAllIn
|
||||
}
|
||||
@@ -417,7 +433,7 @@ PlayerAllIn ::= SEQUENCE {
|
||||
allInCard2 Card
|
||||
}
|
||||
|
||||
EndOfHandMessage ::= [APPLICATION 26] SEQUENCE {
|
||||
EndOfHandMessage ::= [APPLICATION 27] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
endOfHandType CHOICE {
|
||||
endOfHandShowCards [0] EndOfHandShowCards,
|
||||
@@ -445,7 +461,7 @@ EndOfHandHideCards ::= SEQUENCE {
|
||||
playerMoney INTEGER(0..10000000)
|
||||
}
|
||||
|
||||
EndOfGameMessage ::= [APPLICATION 27] SEQUENCE {
|
||||
EndOfGameMessage ::= [APPLICATION 28] SEQUENCE {
|
||||
gameId NonZeroId,
|
||||
winnerPlayerId NonZeroId
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user