Skip to content
Permalink
Browse files
8241761: Typos: empty lines in javadoc, inconsistent indents, etc. (s…
…ecurity-libs only)

Reviewed-by: weijun
  • Loading branch information
Ivan Gerasimov committed Apr 2, 2020
1 parent cc25927 commit 3790e58090be25421e3e323eb29deea100b7608c
Show file tree
Hide file tree
Showing 65 changed files with 606 additions and 620 deletions.
@@ -127,7 +127,7 @@ private static void permissionCheck() {
public KeychainStore() { }

/**
* Returns the key associated with the given alias, using the given
* Returns the key associated with the given alias, using the given
* password to recover it.
*
* @param alias the alias name
@@ -240,10 +240,10 @@ public Key engineGetKey(String alias, char[] password)
* @param alias the alias name
*
* @return the certificate chain (ordered with the user's certificate first
* and the root certificate authority last), or null if the given alias
* and the root certificate authority last), or null if the given alias
* does not exist or does not contain a certificate chain (i.e., the given
* alias identifies either a <i>trusted certificate entry</i> or a
* <i>key entry</i> without a certificate chain).
* alias identifies either a <i>trusted certificate entry</i> or a
* <i>key entry</i> without a certificate chain).
*/
public Certificate[] engineGetCertificateChain(String alias) {
permissionCheck();
@@ -297,7 +297,7 @@ public Certificate engineGetCertificate(String alias) {
}

/**
* Returns the creation date of the entry identified by the given alias.
* Returns the creation date of the entry identified by the given alias.
*
* @param alias the alias name
*
@@ -321,7 +321,7 @@ public Date engineGetCreationDate(String alias) {
}

/**
* Assigns the given key to the given alias, protecting it with the given
* Assigns the given key to the given alias, protecting it with the given
* password.
*
* <p>If the given key is of type <code>java.security.PrivateKey</code>,
@@ -330,14 +330,14 @@ public Date engineGetCreationDate(String alias) {
*
* <p>If the given alias already exists, the keystore information
* associated with it is overridden by the given key (and possibly
* certificate chain).
* certificate chain).
*
* @param alias the alias name
* @param key the key to be associated with the alias
* @param password the password to protect the key
* @param chain the certificate chain for the corresponding public
* key (only required if the given key is of type
* <code>java.security.PrivateKey</code>).
* <code>java.security.PrivateKey</code>).
*
* @exception KeyStoreException if the given key cannot be protected, or
* this operation fails for some other reason
@@ -391,7 +391,7 @@ public void engineSetKeyEntry(String alias, Key key, char[] password,
}

/**
* Assigns the given key (that has already been protected) to the given
* Assigns the given key (that has already been protected) to the given
* alias.
*
* <p>If the protected key is of type
@@ -403,13 +403,13 @@ public void engineSetKeyEntry(String alias, Key key, char[] password,
*
* <p>If the given alias already exists, the keystore information
* associated with it is overridden by the given key (and possibly
* certificate chain).
* certificate chain).
*
* @param alias the alias name
* @param key the key (in protected format) to be associated with the alias
* @param chain the certificate chain for the corresponding public
* key (only useful if the protected key is of type
* <code>java.security.PrivateKey</code>).
* <code>java.security.PrivateKey</code>).
*
* @exception KeyStoreException if this operation fails.
*/
@@ -449,7 +449,7 @@ public void engineSetKeyEntry(String alias, byte[] key,
}

/**
* Assigns the given certificate to the given alias.
* Assigns the given certificate to the given alias.
*
* <p>If the given alias already exists in this keystore and identifies a
* <i>trusted certificate entry</i>, the certificate associated with it is
@@ -501,7 +501,7 @@ public void engineSetCertificateEntry(String alias, Certificate cert)
}

/**
* Deletes the entry identified by the given alias from this keystore.
* Deletes the entry identified by the given alias from this keystore.
*
* @param alias the alias name
*
@@ -519,7 +519,7 @@ public void engineDeleteEntry(String alias)
}

/**
* Lists all the alias names of this keystore.
* Lists all the alias names of this keystore.
*
* @return enumeration of the alias names
*/
@@ -529,7 +529,7 @@ public Enumeration<String> engineAliases() {
}

/**
* Checks if the given alias exists in this keystore.
* Checks if the given alias exists in this keystore.
*
* @param alias the alias name
*
@@ -541,7 +541,7 @@ public boolean engineContainsAlias(String alias) {
}

/**
* Retrieves the number of entries in this keystore.
* Retrieves the number of entries in this keystore.
*
* @return the number of entries in this keystore
*/
@@ -551,7 +551,7 @@ public int engineSize() {
}

/**
* Returns true if the entry identified by the given alias is a
* Returns true if the entry identified by the given alias is a
* <i>key entry</i>, and false otherwise.
*
* @return true if the entry identified by the given alias is a
@@ -568,7 +568,7 @@ public boolean engineIsKeyEntry(String alias) {
}

/**
* Returns true if the entry identified by the given alias is a
* Returns true if the entry identified by the given alias is a
* <i>trusted certificate entry</i>, and false otherwise.
*
* @return true if the entry identified by the given alias is a
@@ -585,7 +585,7 @@ public boolean engineIsCertificateEntry(String alias) {
}

/**
* Returns the (alias) name of the first keystore entry whose certificate
* Returns the (alias) name of the first keystore entry whose certificate
* matches the given certificate.
*
* <p>This method attempts to match the given certificate with each
@@ -624,7 +624,7 @@ public String engineGetCertificateAlias(Certificate cert) {
}

/**
* Stores this keystore to the given output stream, and protects its
* Stores this keystore to the given output stream, and protects its
* integrity with the given password.
*
* @param stream Ignored. the output stream to which this keystore is written.
@@ -718,7 +718,7 @@ private long addCertificateToKeychain(String alias, Certificate cert) {
private native void _releaseKeychainItemRef(long keychainItemRef);

/**
* Loads the keystore from the Keychain.
* Loads the keystore from the Keychain.
*
* @param stream Ignored - here for API compatibility.
* @param password Ignored - if user needs to unlock keychain Security
@@ -918,7 +918,7 @@ private byte[] fetchPrivateKeyFromBag(byte[] privateKeyInfo) throws IOException,
}

/*
* Read the authSafe.
* Read the authSafe.
*/
byte[] authSafeData;
ContentInfo authSafe = new ContentInfo(s);
@@ -1003,7 +1003,7 @@ private byte[] extractKeyData(DerInputStream stream)
}

/*
* Generate PBE Algorithm Parameters
* Generate PBE Algorithm Parameters
*/
private AlgorithmParameters getAlgorithmParameters(String algorithm)
throws IOException
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2020, 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
@@ -40,9 +40,9 @@
*
* <pre>
* id-alg-AEADChaCha20Poly1305 OBJECT IDENTIFIER ::=
{ iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
pkcs9(9) smime(16) alg(3) 18 }
* { iso(1) member-body(2) us(840) rsadsi(113549) pkcs(1)
* pkcs9(9) smime(16) alg(3) 18 }
*
* AEADChaCha20Poly1305Nonce ::= OCTET STRING (SIZE(12))
* </pre>
*
@@ -86,7 +86,7 @@ protected void engineInit(AlgorithmParameterSpec paramSpec)
/**
* Initialize the ChaCha20Poly1305Parameters from a DER encoded
* parameter block.
*
* @param encoded the DER encoding of the nonce as an OCTET STRING.
*
* @throws IOException if the encoded nonce is not 12 bytes long or a DER
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@@ -103,7 +103,7 @@ abstract void init(boolean decrypting, String algorithm, byte[] key,
byte[] iv) throws InvalidKeyException,
InvalidAlgorithmParameterException;

/**
/**
* Gets the initialization vector.
*
* @return the initialization vector
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2002, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2002, 2020, 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
@@ -88,7 +88,7 @@ void setMode(String mode) throws NoSuchAlgorithmException {
cipher.setMode(mode);
}

/**
/**
* Sets the padding mechanism of this cipher. This algorithm only uses
* PKCS #5 padding.
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@@ -75,7 +75,7 @@ protected void engineSetMode(String mode) throws NoSuchAlgorithmException {
}
}

/**
/**
* Sets the padding mechanism of this cipher. This algorithm only uses
* PKCS #5 padding.
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020, 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
@@ -87,7 +87,7 @@ protected void engineSetMode(String mode) throws NoSuchAlgorithmException {
}
}

/**
/**
* Sets the padding mechanism of this cipher. This algorithm only uses
* PKCS #5 padding.
*
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@@ -311,10 +311,10 @@ final String getCanonicalName() {
private static final long serialVersionUID = 739301742472979399L;

/**
* Key is name, value is permission. All permission objects in
* collection must be of the same type.
* Not serialized; see serialization section at end of class.
*/
* Key is name, value is permission. All permission objects in
* collection must be of the same type.
* Not serialized; see serialization section at end of class.
*/
private transient ConcurrentHashMap<String, Permission> perms;

/**
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, 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
@@ -115,7 +115,7 @@ protected abstract PrivateKey engineGeneratePrivate(KeySpec keySpec)
*
* @return the underlying key specification (key material) in an instance
* of the requested specification class.
*
* @throws InvalidKeySpecException if the requested key specification is
* inappropriate for the given key, or the given key cannot be dealt with
* (e.g., the given key has an unrecognized format).
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -58,14 +58,14 @@ public KeyManagementException() {
super();
}

/**
/**
* Constructs a KeyManagementException with the specified detail
* message. A detail message is a String that describes this
* particular exception.
*
* @param msg the detail message.
*/
public KeyManagementException(String msg) {
public KeyManagementException(String msg) {
super(msg);
}

@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -72,12 +72,12 @@ public PublicKey getPublic() {
return publicKey;
}

/**
/**
* Returns a reference to the private key component of this key pair.
*
* @return a reference to the private key.
*/
public PrivateKey getPrivate() {
public PrivateKey getPrivate() {
return privateKey;
}
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2020, 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
@@ -66,7 +66,7 @@ public interface PrivateKey extends Key, javax.security.auth.Destroyable {
*
* @deprecated A {@code serialVersionUID} field in an interface is
* ineffectual. Do not use; no replacement.
*/
*/
@Deprecated
@SuppressWarnings("serial")
@java.io.Serial
@@ -287,7 +287,7 @@ protected Provider(String name, String versionStr, String info) {
* @throws UnsupportedOperationException if a configuration argument is
* not supported.
* @throws NullPointerException if the supplied configuration argument is
null.
* null.
* @throws InvalidParameterException if the supplied configuration argument
* is invalid.
* @return a provider configured with the supplied configuration argument.

0 comments on commit 3790e58

Please sign in to comment.