KDC-REQ ::= SEQUENCE { -- NOTE: first tag is [1], not [0] pvno [1] INTEGER (5) , msg-type [2] INTEGER (10 -- AS -- | 12 -- TGS --), padata [3] SEQUENCE OF OPTIONAL -- NOTE: not empty --, req-body [4] }
240241242243244245246247248249250
long now = System.currentTimeMillis(); KerberosTime requestedEndTime = new KerberosTime( now + 1 * KerberosTime.DAY ); kdcReqBody.setTill( requestedEndTime ); KdcReq message = getKdcRequest( tgt, kdcReqBody ); handler.messageReceived( session, message ); Object msg = session.getMessage(); assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
291292293294295296297298299300301
347348349350351352353354355356357
HostAddress[] address = { new HostAddress( InetAddress.getByName( "127.0.0.1" ) ) }; HostAddresses addresses = new HostAddresses( address ); kdcReqBody.setAddresses( addresses ); KdcReq message = getKdcRequest( tgt, kdcReqBody ); handler.messageReceived( session, message ); Object msg = session.getMessage(); assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
403404405406407408409410411412413
454455456457458459460461462463464
505506507508509510511512513514515
556557558559560561562563564565566
long currentTime = System.currentTimeMillis(); KerberosTime requestedEndTime = new KerberosTime( currentTime + KerberosTime.DAY ); kdcReqBody.setTill( requestedEndTime ); KdcReq message = getKdcRequest( tgt, kdcReqBody ); handler.messageReceived( session, message ); Object msg = session.getMessage(); assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
600601602603604605606607608609610
651652653654655656657658659660661
long now = System.currentTimeMillis(); KerberosTime requestedEndTime = new KerberosTime( now + KerberosTime.WEEK ); kdcReqBody.setTill( requestedEndTime ); KdcReq message = getKdcRequest( tgt, kdcReqBody ); handler.messageReceived( session, message ); Object msg = session.getMessage(); assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );
705706707708709710711712713714715
kdcReqBody.setTill( requestedEndTime ); KerberosTime requestedRenewTillTime = new KerberosTime( now + KerberosTime.WEEK / 2 ); kdcReqBody.setRtime( requestedRenewTillTime ); KdcReq message = getKdcRequest( tgt, kdcReqBody ); handler.messageReceived( session, message ); Object msg = session.getMessage(); assertEquals( "session.getMessage() instanceOf", KrbError.class, msg.getClass() );