private Authenticator makeAuthenticator() throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(clientPrincipal); authenticator.setCrealm(sgtTicket.getRealm()); long millis = System.currentTimeMillis(); int usec = (int) (millis % 1000) * 1000; millis -= millis % 1000; authenticator.setCtime(new KerberosTime(millis)); authenticator.setCusec(usec); if (flags.contains(ApOption.USE_SESSION_KEY)) { authenticator.setSubKey(sgtTicket.getSessionKey()); } return authenticator; }
private Authenticator makeAuthenticator() throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(clientPrincipal); authenticator.setCrealm(sgtTicket.getRealm()); long millis = System.currentTimeMillis(); int usec = (int) (millis % 1000) * 1000; millis -= millis % 1000; authenticator.setCtime(new KerberosTime(millis)); authenticator.setCusec(usec); if (flags.contains(ApOption.USE_SESSION_KEY)) { authenticator.setSubKey(sgtTicket.getSessionKey()); } return authenticator; }
private Authenticator makeAuthenticator() throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(clientPrincipal); authenticator.setCrealm(sgtTicket.getRealm()); long millis = System.currentTimeMillis(); int usec = (int) (millis % 1000) * 1000; millis -= millis % 1000; authenticator.setCtime(new KerberosTime(millis)); authenticator.setCusec(usec); if (flags.contains(ApOption.USE_SESSION_KEY)) { authenticator.setSubKey(sgtTicket.getSessionKey()); } return authenticator; }
protected Authenticator makeAuthenticator(Credential credential, EncryptionKey subKey) throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(credential.getClientName()); authenticator.setCrealm(credential.getClientRealm()); authenticator.setCtime(KerberosTime.now()); authenticator.setCusec(0); authenticator.setSubKey(subKey); KdcReqBody reqBody = kdcRequest.getReqBody(null); CheckSum checksum = CheckSumUtil.seal(reqBody, null, subKey, KeyUsage.TGS_REQ_AUTH_CKSUM); authenticator.setCksum(checksum); return authenticator; } }
protected Authenticator makeAuthenticator(Credential credential, EncryptionKey subKey) throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(credential.getClientName()); authenticator.setCrealm(credential.getClientRealm()); authenticator.setCtime(KerberosTime.now()); authenticator.setCusec(0); authenticator.setSubKey(subKey); KdcReqBody reqBody = kdcRequest.getReqBody(null); CheckSum checksum = CheckSumUtil.seal(reqBody, null, subKey, KeyUsage.TGS_REQ_AUTH_CKSUM); authenticator.setCksum(checksum); return authenticator; } }
private Authenticator makeAuthenticator() throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(clientPrincipal); authenticator.setCrealm(clientPrincipal.getRealm()); authenticator.setCtime(KerberosTime.now()); authenticator.setCusec(0); authenticator.setSubKey(ticket.getSessionKey()); KerberosTime renewTill = null; if (getRequestOptions().contains(KrbKdcOption.RENEW)) { renewTill = ticket.getEncKdcRepPart().getRenewTill(); } KdcReqBody reqBody = getReqBody(renewTill); CheckSum checksum = CheckSumUtil.seal(reqBody, null, ticket.getSessionKey(), KeyUsage.TGS_REQ_AUTH_CKSUM); authenticator.setCksum(checksum); return authenticator; } }
private Authenticator makeAuthenticator() throws KrbException { Authenticator authenticator = new Authenticator(); authenticator.setAuthenticatorVno(5); authenticator.setCname(clientPrincipal); authenticator.setCrealm(clientPrincipal.getRealm()); authenticator.setCtime(KerberosTime.now()); authenticator.setCusec(0); authenticator.setSubKey(ticket.getSessionKey()); KerberosTime renewTill = null; if (getRequestOptions().contains(KrbKdcOption.RENEW)) { renewTill = ticket.getEncKdcRepPart().getRenewTill(); } KdcReqBody reqBody = getReqBody(renewTill); CheckSum checksum = CheckSumUtil.seal(reqBody, null, ticket.getSessionKey(), KeyUsage.TGS_REQ_AUTH_CKSUM); authenticator.setCksum(checksum); return authenticator; } }