Skip to content

Commit f631c98

Browse files
committed
8285380: Fix typos in security
Reviewed-by: weijun, wetmore
1 parent 237f280 commit f631c98

File tree

52 files changed

+81
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+81
-81
lines changed

src/java.security.jgss/macosx/native/libosxkrb5/nativeccache.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ jobject BuildAddressList(JNIEnv *env, krb5_address **addresses) {
593593
if (address == NULL) {
594594
return (jobject) NULL;
595595
}
596-
// Add the HostAddress to the arrray.
596+
// Add the HostAddress to the array.
597597
(*env)->SetObjectArrayElement(env, address_list, index, address);
598598

599599
if ((*env)->ExceptionCheck(env)) {

src/java.security.jgss/share/classes/javax/security/auth/kerberos/EncryptionKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public byte[] getEncoded() {
141141
/**
142142
* Destroys this key by clearing out the key material of this key.
143143
*
144-
* @throws DestroyFailedException if some error occurs while destorying
144+
* @throws DestroyFailedException if some error occurs while destroying
145145
* this key.
146146
*/
147147
@Override

src/java.security.jgss/share/classes/javax/security/auth/kerberos/KerberosKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ public final byte[] getEncoded() {
244244
/**
245245
* Destroys this key by clearing out the key material of this secret key.
246246
*
247-
* @throws DestroyFailedException if some error occurs while destorying
247+
* @throws DestroyFailedException if some error occurs while destroying
248248
* this key.
249249
*/
250250
public void destroy() throws DestroyFailedException {

src/java.security.jgss/share/classes/javax/security/auth/kerberos/KeyImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public KeyImpl(byte[] keyBytes,
7575
* @param principal the principal from which to derive the salt
7676
* @param password the password that should be used to compute the
7777
* key.
78-
* @param algorithm the name for the algorithm that this key wil be
78+
* @param algorithm the name for the algorithm that this key will be
7979
* used for. This parameter may be null in which case "DES" will be
8080
* assumed.
8181
*/

src/java.security.jgss/share/classes/org/ietf/jgss/GSSException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ public GSSException (int majorCode) {
249249
* specific major string for it.
250250
*
251251
* @param majorCode the fatal error code causing this exception.
252-
* @param majorString an expicit message to be included in this exception
252+
* @param majorString an explicit message to be included in this exception
253253
*/
254254
GSSException (int majorCode, String majorString) {
255255

src/java.security.jgss/share/classes/sun/security/jgss/GSSHeader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
/*
4747
* The RFC states that implementations should explicitly follow the
48-
* encoding scheme descibed in this section rather than use ASN.1
48+
* encoding scheme described in this section rather than use ASN.1
4949
* compilers. However, we should consider removing duplicate ASN.1
5050
* like code from here and depend on sun.security.util if possible.
5151
*/
@@ -131,7 +131,7 @@ public int getMechTokenLength() {
131131

132132
/**
133133
* Used to obtain the length of the encoding of this GSSHeader.
134-
* @return the lenght of the encoding of this GSSHeader instance.
134+
* @return the length of the encoding of this GSSHeader instance.
135135
*/
136136
public int getLength() {
137137
int lenField = mechOidBytes.length + mechTokenLength;

src/java.security.jgss/share/classes/sun/security/jgss/ProviderList.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,9 +396,9 @@ public synchronized void addProviderAtEnd(Provider p, Oid mechOid)
396396
}
397397

398398
/**
399-
* Helper routine to go through all properties contined in a
399+
* Helper routine to go through all properties continued in a
400400
* provider and add its mechanisms to the list of supported
401-
* mechanisms. If no default mechanism has been assinged so far,
401+
* mechanisms. If no default mechanism has been assigned so far,
402402
* it sets the default MechanismFactory and Oid as well.
403403
* @param p the provider to query
404404
* @return true if there is at least one mechanism that this

src/java.security.jgss/share/classes/sun/security/jgss/TokenTracker.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private int getIntervalIndex(int number) {
108108
* The following represents the number line with positions of
109109
* initNumber, windowStart, expectedNumber marked on it. Regions in
110110
* between them show the different sequencing and replay state
111-
* possibilites for tokens that fall in there.
111+
* possibilities for tokens that fall in there.
112112
*
113113
* (1) windowStart
114114
* initNumber expectedNumber
@@ -277,7 +277,7 @@ private void add(int number, int prevEntryPos) {
277277

278278
/*
279279
* At this point we know that the number will start a new interval
280-
* which needs to be added to the list. We might have to recyle an
280+
* which needs to be added to the list. We might have to recycle an
281281
* older entry in the list.
282282
*/
283283

@@ -353,7 +353,7 @@ public String toString() {
353353

354354
/**
355355
* An entry in the list that represents the sequence of received
356-
* tokens. Each entry is actaully an interval of numbers, all of which
356+
* tokens. Each entry is actually an interval of numbers, all of which
357357
* have been received.
358358
*/
359359
class Entry {

src/java.security.jgss/share/classes/sun/security/jgss/krb5/CipherHelper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ private final Cipher getInitializedDes(boolean encryptMode, byte[] key,
987987
* @param len the length of the encrypted data
988988
* @param dataOutBuf the output buffer where the application data
989989
* should be writte
990-
* @param dataOffset the offser where the application data should
990+
* @param dataOffset the offset where the application data should
991991
* be written.
992992
* @throws GSSException is an error occurs while decrypting the
993993
* data
@@ -1078,7 +1078,7 @@ private void desCbcDecrypt(WrapToken token, byte[] key, byte[] cipherText,
10781078
* @param len the length of the ciphertext data
10791079
* @param dataOutBuf the output buffer where the application data
10801080
* should be writte
1081-
* @param dataOffset the offser where the application data should
1081+
* @param dataOffset the offset where the application data should
10821082
* be written.
10831083
* @throws GSSException is an error occurs while decrypting the
10841084
* data

src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5InitCredential.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ private Krb5InitCredential(Krb5NameElement name,
147147
.kerberosTicketSetServerAlias(this, serverAlias);
148148
this.name = name;
149149
// A delegated cred does not have all fields set. So do not try to
150-
// creat new Credentials out of the delegatedCred.
150+
// create new Credentials out of the delegatedCred.
151151
this.krb5Credentials = delegatedCred;
152152
}
153153

src/java.security.jgss/share/classes/sun/security/jgss/krb5/Krb5NameElement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ public Oid getGSSNameType() {
322322
* @return the Oid for the format of the printed name
323323
*/
324324
public Oid getStringNameType() {
325-
// XXX For NT_EXPORT_NAME return a different name type. Infact,
325+
// XXX For NT_EXPORT_NAME return a different name type. In fact,
326326
// don't even store NT_EXPORT_NAME in the cons.
327327
return (gssNameType);
328328
}

src/java.security.jgss/share/classes/sun/security/jgss/krb5/MessageToken.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
* </pre>
6666
* Where "s" indicates the size of the checksum.
6767
* <p>
68-
* As always, this is preceeded by a GSSHeader.
68+
* As always, this is preceded by a GSSHeader.
6969
*
7070
* @author Mayank Upadhyay
7171
* @author Ram Marti
@@ -141,7 +141,7 @@ abstract class MessageToken extends Krb5Token {
141141

142142
/**
143143
* Constructs a MessageToken from a byte array. If there are more bytes
144-
* in the array than needed, the extra bytes are simply ignroed.
144+
* in the array than needed, the extra bytes are simply ignored.
145145
*
146146
* @param tokenId the token id that should be contained in this token as
147147
* it is read.
@@ -536,7 +536,7 @@ protected static final int getTokenSize(CipherHelper ch)
536536
}
537537

538538
/**
539-
* Obtains the conext key that is associated with this token.
539+
* Obtains the context key that is associated with this token.
540540
* @return the context key
541541
*/
542542
/*

src/java.security.jgss/share/classes/sun/security/jgss/krb5/SubjectComber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ private static <T> Object findAux(Subject subject, String serverPrincipal,
181181
} catch (DestroyFailedException dfe) {
182182
if (DEBUG) {
183183
System.out.println("Expired ticket not" +
184-
" detroyed successfully. " + dfe);
184+
" destroyed successfully. " + dfe);
185185
}
186186
}
187187
}

src/java.security.jgss/share/classes/sun/security/jgss/spi/GSSContextSpi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
* On the other hands, tokens used for per-message calls are generated
6363
* entirely by the mechanism. It is possible that the mechanism chooses to
6464
* encase inner-level per-message tokens in a header similar to that used
65-
* for initial tokens, however, this is upto the mechanism to do. The token
65+
* for initial tokens, however, this is up to the mechanism to do. The token
6666
* to/from the per-message calls are opaque to the GSS-Framework.
6767
* </strong>
6868
* <p>
@@ -81,7 +81,7 @@
8181
* the token directly form an InputStream but output it to some byte[] for
8282
* the application to process. Unfortunately the high level GSS bindings
8383
* do not contain overloaded forms of wrap() and unwrap() that do just
84-
* this, however we have accomodated those cases here with the expectation
84+
* this, however we have accommodated those cases here with the expectation
8585
* that this will be rolled into the high level bindings sooner or later.
8686
*
8787
* @author Mayank Upadhyay
@@ -161,7 +161,7 @@ public interface GSSContextSpi {
161161
* <p>
162162
* All overloaded forms of GSSContext.initSecContext() can be handled
163163
* with this mechanism level initSecContext. Since the output token
164-
* from this method is a fixed size, not exeedingly large, and a one
164+
* from this method is a fixed size, not exceedingly large, and a one
165165
* time deal, an overloaded form that takes an OutputStream has not
166166
* been defined. The GSS-Framwork can write the returned byte[] to any
167167
* application provided OutputStream. Similarly, any application input
@@ -202,7 +202,7 @@ public byte[] initSecContext(InputStream is, int mechTokenSize)
202202
* <p>
203203
* All overloaded forms of GSSContext.acceptSecContext() can be handled
204204
* with this mechanism level acceptSecContext. Since the output token
205-
* from this method is a fixed size, not exeedingly large, and a one
205+
* from this method is a fixed size, not exceedingly large, and a one
206206
* time deal, an overloaded form that takes an OutputStream has not
207207
* been defined. The GSS-Framwork can write the returned byte[] to any
208208
* application provided OutputStream. Similarly, any application input

src/java.security.jgss/share/classes/sun/security/jgss/spi/MechanismFactory.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ public interface MechanismFactory {
102102
* @param initLifetime indicates the lifetime (in seconds) that is
103103
* requested for this credential to be used at the context initiator's
104104
* end. This value should be ignored if the usage is
105-
* ACCEPT_ONLY. Predefined contants are available in the
105+
* ACCEPT_ONLY. Predefined constants are available in the
106106
* org.ietf.jgss.GSSCredential interface.
107107
* @param acceptLifetime indicates the lifetime (in seconds) that is
108108
* requested for this credential to be used at the context acceptor's
109109
* end. This value should be ignored if the usage is
110-
* INITIATE_ONLY. Predefined contants are available in the
110+
* INITIATE_ONLY. Predefined constants are available in the
111111
* org.ietf.jgss.GSSCredential interface.
112112
* @param usage One of the values GSSCredential.INIATE_ONLY,
113113
* GSSCredential.ACCEPT_ONLY, and GSSCredential.INITIATE_AND_ACCEPT.
@@ -169,7 +169,7 @@ public GSSNameSpi getNameElement(byte[] name, Oid nameType)
169169
* mechanism's choice should be assumed to be the context initiator and
170170
* that default credentials should be applied.
171171
* @param lifetime the requested lifetime (in seconds) for the security
172-
* context. Predefined contants are available in the
172+
* context. Predefined constants are available in the
173173
* org.ietf.jgss.GSSContext interface.
174174
* @throws GSSException if any of the errors described in RFC 2743 in
175175
* the GSS_Init_Sec_Context call occur.
@@ -184,8 +184,8 @@ public GSSContextSpi getMechanismContext(GSSNameSpi peer,
184184
*
185185
* @param myAcceptorCred a credential element for the context acceptor
186186
* obtained previously from this mechanism. The identity of the context
187-
* acceptor cna be obtained from this credential. Passing a value of
188-
* null here indicates that tha default entity of the mechanism's
187+
* acceptor can be obtained from this credential. Passing a value of
188+
* null here indicates that the default entity of the mechanism's
189189
* choice should be assumed to be the context acceptor and default
190190
* credentials should be applied.
191191
*

src/java.security.jgss/share/classes/sun/security/jgss/spnego/SpNegoContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ public final byte[] initSecContext(InputStream is, int mechTokenSize)
356356
// pull out mechanism
357357
internal_mech = targToken.getSupportedMech();
358358
if (internal_mech == null) {
359-
// return wth failure
359+
// return with failure
360360
throw new GSSException(errorCode, -1,
361361
"supported mechanism from server is null");
362362
}
@@ -696,7 +696,7 @@ private Oid[] getAvailableMechs() {
696696
}
697697

698698
/**
699-
* get ther DER encoded MechList
699+
* get the DER encoded MechList
700700
*/
701701
private byte[] getEncodedMechs(Oid[] mechSet)
702702
throws IOException, GSSException {
@@ -911,7 +911,7 @@ private byte[] GSS_acceptSecContext(byte[] token) throws GSSException {
911911
}
912912

913913
/**
914-
* This routine compares the recieved mechset to the mechset that
914+
* This routine compares the received mechset to the mechset that
915915
* this server can support. It looks sequentially through the mechset
916916
* and the first one that matches what the server can support is
917917
* chosen as the negotiated mechanism. If one is found, negResult

src/java.security.jgss/share/classes/sun/security/krb5/Checksum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public Checksum(DerValue encoding) throws Asn1Exception, IOException {
187187
* specification available at
188188
* <a href="http://www.ietf.org/rfc/rfc4120.txt">
189189
* http://www.ietf.org/rfc/rfc4120.txt</a>.
190-
* @return byte array of enocded Checksum.
190+
* @return byte array of encoded Checksum.
191191
* @exception Asn1Exception if an error occurs while decoding an
192192
* ASN1 encoded data.
193193
* @exception IOException if an I/O error occurs while reading

src/java.security.jgss/share/classes/sun/security/krb5/Config.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public class Config {
104104

105105
private static boolean DEBUG = sun.security.krb5.internal.Krb5.DEBUG;
106106

107-
// these are used for hexdecimal calculation.
107+
// these are used for hexadecimal calculation.
108108
private static final int BASE16_0 = 1;
109109
private static final int BASE16_1 = 16;
110110
private static final int BASE16_2 = 16 * 16;
@@ -275,7 +275,7 @@ public String get(String... keys) {
275275
/**
276276
* Gets the boolean value for the specified keys. Returns TRUE if the
277277
* string value is "yes", or "true", FALSE if "no", or "false", or null
278-
* if otherwise or not defined. The comparision is case-insensitive.
278+
* if otherwise or not defined. The comparison is case-insensitive.
279279
*
280280
* @param keys the keys, see {@link #get(String...)}
281281
* @return the boolean value, or null if there is no value defined or the

src/java.security.jgss/share/classes/sun/security/krb5/EncryptionKey.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public static EncryptionKey[] acquireSecretKeys(PrincipalName princ,
112112

113113
if (princ == null)
114114
throw new IllegalArgumentException(
115-
"Cannot have null pricipal name to look in keytab.");
115+
"Cannot have null principal name to look in keytab.");
116116

117117
// KeyTab getInstance(keytab) will call KeyTab.getInstance()
118118
// if keytab is null

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public EncASRepPart(
6565
Krb5.KRB_ENC_AS_REP_PART
6666
);
6767
//may need to use Krb5.KRB_ENC_TGS_REP_PART to mimic
68-
//behavior of other implementaions, instead of above
68+
//behavior of other implementations, instead of above
6969
}
7070

7171
public EncASRepPart(byte[] data) throws Asn1Exception,

src/java.security.jgss/share/classes/sun/security/krb5/internal/ccache/MemoryCredentialsCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
//Windows supports the "API: cache" type, which is a shared memory cache. This is
3939
//implemented by krbcc32.dll as part of the MIT Kerberos for Win32 distribution.
40-
//MemoryCredentialsCache will provide future functions to access shared memeory cache on
40+
//MemoryCredentialsCache will provide future functions to access shared memory cache on
4141
//Windows platform. Native code implementation may be necessary.
4242
/**
4343
* This class extends CredentialsCache. It is used for accessing data in shared memory

src/java.security.jgss/share/classes/sun/security/krb5/internal/crypto/dk/DkCrypto.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ byte[] dk(byte[] key, byte[] constant)
470470
* must be expanded with n-fold() so it can be encrypted. If the output
471471
* of E is shorter than k bits it is fed back into the encryption as
472472
* many times as necessary. The construct is as follows (where |
473-
* indicates concatentation):
473+
* indicates concatenation):
474474
*
475475
* K1 = E(Key, n-fold(Constant), initial-cipher-state)
476476
* K2 = E(Key, K1, initial-cipher-state)

src/java.security.jgss/share/classes/sun/security/krb5/internal/ktab/KeyTab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public class KeyTab implements KeyTabConstants {
8686
/**
8787
* Constructs a KeyTab object.
8888
*
89-
* If there is any I/O error or format errot during the loading, the
89+
* If there is any I/O error or format error during the loading, the
9090
* isValid flag is set to false, and all half-read entries are dismissed.
9191
* @param filename path name for the keytab file, must not be null
9292
*/

src/java.security.jgss/share/classes/sun/security/krb5/internal/util/KrbDataInputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
import java.io.IOException;
3737

3838
/**
39-
* This class implements a buffered input stream. It provides methods to read a chunck
39+
* This class implements a buffered input stream. It provides methods to read a chunk
4040
* of data from underlying data stream.
4141
*
4242
* @author Yanni Zhang

src/java.security.jgss/share/classes/sun/security/krb5/internal/util/KrbDataOutputStream.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
import java.io.OutputStream;
3636

3737
/**
38-
* This class implements a buffered output stream. It provides methods to write a chunck of
38+
* This class implements a buffered output stream. It provides methods to write a chunk of
3939
* bytes to underlying data stream.
4040
*
4141
* @author Yanni Zhang

src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Kinit.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static void main(String[] args) {
117117
/**
118118
* Constructs a new Kinit object.
119119
* @param args array of ticket request options.
120-
* Avaiable options are: -f, -p, -c, principal, password.
120+
* Available options are: -f, -p, -c, principal, password.
121121
* @exception IOException if an I/O error occurs.
122122
* @exception RealmException if the Realm could not be instantiated.
123123
* @exception KrbException if error occurs during Kerberos operation.

src/java.security.jgss/windows/classes/sun/security/krb5/internal/tools/Ktab.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ void printHelp() {
469469
+ " kvno. If \"all\" is specified, delete all keys. If \"old\" is specified,\n"
470470
+ " delete all keys except those with the highest kvno. Default action\n"
471471
+ " is \"all\". If <etype> is specified, only keys of this encryption type\n"
472-
+ " are deleted. <etype> should be specified as the numberic value etype\n"
472+
+ " are deleted. <etype> should be specified as the numeric value etype\n"
473473
+ " defined in RFC 3961, section 8. A prompt to confirm the deletion is\n"
474474
+ " displayed unless -f is specified.");
475475
System.out.println();

src/java.security.jgss/windows/native/libw2k_lsa_auth/NativeCreds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1006,7 +1006,7 @@ jobject BuildTicketFlags(JNIEnv *env, PULONG flags) {
10061006
jobject ticketFlags = NULL;
10071007
jbyteArray ary;
10081008
/*
1009-
* mdu: Convert the bytes to nework byte order before copying
1009+
* mdu: Convert the bytes to network byte order before copying
10101010
* them to a Java byte array.
10111011
*/
10121012
ULONG nlflags = htonl(*flags);

0 commit comments

Comments
 (0)