< prev index next >

src/java.security.jgss/share/classes/sun/security/krb5/internal/KRBError.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 88,98 **** private KerberosTime cTime; //optional private Integer cuSec; //optional private KerberosTime sTime; private Integer suSec; private int errorCode; - private Realm crealm; //optional private PrincipalName cname; //optional private PrincipalName sname; private String eText; //optional private byte[] eData; //optional private Checksum eCksum; //optional --- 88,97 ----
*** 137,147 **** cTime = new_cTime; cuSec = new_cuSec; sTime = new_sTime; suSec = new_suSec; errorCode = new_errorCode; - crealm = new_cname.getRealm(); cname = new_cname; sname = new_sname; eText = new_eText; eData = new_eData; --- 136,145 ----
*** 166,176 **** cTime = new_cTime; cuSec = new_cuSec; sTime = new_sTime; suSec = new_suSec; errorCode = new_errorCode; - crealm = new_cname.getRealm(); cname = new_cname; sname = new_sname; eText = new_eText; eData = new_eData; eCksum = new_eCksum; --- 164,173 ----
*** 263,276 **** } } pa = paList.toArray(new PAData[paList.size()]); } - public final Realm getClientRealm() { - return crealm; - } - public final KerberosTime getServerTime() { return sTime; } public final KerberosTime getClientTime() { --- 260,269 ----
*** 354,364 **** subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); ! crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null; --- 347,357 ---- subDer = der.getData().getDerValue(); if ((subDer.getTag() & (byte)0x1F) == (byte)0x06) { errorCode = subDer.getData().getBigInteger().intValue(); } else throw new Asn1Exception(Krb5.ASN1_BAD_ID); ! Realm crealm = Realm.parse(der.getData(), (byte)0x07, true); cname = PrincipalName.parse(der.getData(), (byte)0x08, true, crealm); Realm realm = Realm.parse(der.getData(), (byte)0x09, false); sname = PrincipalName.parse(der.getData(), (byte)0x0A, false, realm); eText = null; eData = null;
*** 398,410 **** System.out.println("\t sTime is " + sTime.toDate().toString () + " " + sTime.toDate().getTime()); System.out.println("\t suSec is " + suSec); System.out.println("\t error code is " + errorCode); System.out.println("\t error Message is " + Krb5.getErrorMessage(errorCode)); - if (crealm != null) { - System.out.println("\t crealm is " + crealm.toString()); - } if (cname != null) { System.out.println("\t cname is " + cname.toString()); } if (sname != null) { System.out.println("\t sname is " + sname.toString()); --- 391,400 ----
*** 450,463 **** bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x05), temp); temp = new DerOutputStream(); temp.putInteger(BigInteger.valueOf(errorCode)); bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x06), temp); - if (crealm != null) { - bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x07), crealm.asn1Encode()); - } if (cname != null) { bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x08), cname.asn1Encode()); } bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x09), sname.getRealm().asn1Encode()); bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x0A), sname.asn1Encode()); --- 440,451 ---- bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x05), temp); temp = new DerOutputStream(); temp.putInteger(BigInteger.valueOf(errorCode)); bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x06), temp); if (cname != null) { + bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x07), cname.getRealm().asn1Encode()); bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x08), cname.asn1Encode()); } bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x09), sname.getRealm().asn1Encode()); bytes.write(DerValue.createTag(DerValue.TAG_CONTEXT, true, (byte)0x0A), sname.asn1Encode());
*** 498,508 **** isEqual(cTime, other.cTime) && isEqual(cuSec, other.cuSec) && isEqual(sTime, other.sTime) && isEqual(suSec, other.suSec) && errorCode == other.errorCode && - isEqual(crealm, other.crealm) && isEqual(cname, other.cname) && isEqual(sname, other.sname) && isEqual(eText, other.eText) && java.util.Arrays.equals(eData, other.eData) && isEqual(eCksum, other.eCksum); --- 486,495 ----
*** 519,529 **** if (cTime != null) result = 37 * result + cTime.hashCode(); if (cuSec != null) result = 37 * result + cuSec.hashCode(); if (sTime != null) result = 37 * result + sTime.hashCode(); if (suSec != null) result = 37 * result + suSec.hashCode(); result = 37 * result + errorCode; - if (crealm != null) result = 37 * result + crealm.hashCode(); if (cname != null) result = 37 * result + cname.hashCode(); if (sname != null) result = 37 * result + sname.hashCode(); if (eText != null) result = 37 * result + eText.hashCode(); result = 37 * result + Arrays.hashCode(eData); if (eCksum != null) result = 37 * result + eCksum.hashCode(); --- 506,515 ----
< prev index next >