diff options
author | Adam Young <ayoung@redhat.com> | 2011-11-10 22:12:52 -0500 |
---|---|---|
committer | Adam Young <ayoung@redhat.com> | 2011-12-06 11:20:03 -0500 |
commit | 6119a0222dee4953d51311489d8863daa62d9b14 (patch) | |
tree | dc30408d3be499e1f84c1c49d41bbc109731fb7a /pki/base/util/src/netscape/security/pkcs | |
parent | 3c1a4af339dc1761b3a68abe9b0f26bd3cb389cf (diff) | |
download | pki-6119a0222dee4953d51311489d8863daa62d9b14.tar.gz pki-6119a0222dee4953d51311489d8863daa62d9b14.tar.xz pki-6119a0222dee4953d51311489d8863daa62d9b14.zip |
call statics statically
https://bugzilla.redhat.com/show_bug.cgi?id=728303
Updated with changes from code review
Leaving in the warning in GenericASN1Extension, ans that is an indication of a real problem, which will get addressed in a separate patch.
Diffstat (limited to 'pki/base/util/src/netscape/security/pkcs')
-rw-r--r-- | pki/base/util/src/netscape/security/pkcs/PKCS8Key.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java index dfa5a728d..20a788fcb 100644 --- a/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java +++ b/pki/base/util/src/netscape/security/pkcs/PKCS8Key.java @@ -60,7 +60,7 @@ public class PKCS8Key implements PrivateKey { protected byte[] encodedKey; /* The version for this key */ - public static final BigInteger version = BigInteger.valueOf(0); + public static final BigInteger VERSION = BigInteger.valueOf(0); /** * Default constructor. The key constructed must have its key @@ -104,9 +104,9 @@ public class PKCS8Key implements PrivateKey { throw new IOException ("corrupt private key"); BigInteger parsedVersion = in.data.getInteger().toBigInteger(); - if (!version.equals(parsedVersion)) { + if (!VERSION.equals(parsedVersion)) { throw new IOException("version mismatch: (supported: " + - version + ", parsed: " + + VERSION + ", parsed: " + parsedVersion); } @@ -324,9 +324,9 @@ public class PKCS8Key implements PrivateKey { BigInteger version = val.data.getInteger().toBigInteger(); - if (!version.equals(this.version)) { + if (!version.equals(PKCS8Key.VERSION)) { throw new IOException("version mismatch: (supported: " + - this.version + ", parsed: " + + PKCS8Key.VERSION + ", parsed: " + version); } algid = AlgorithmId.parse (val.data.getDerValue ()); @@ -389,7 +389,7 @@ public class PKCS8Key implements PrivateKey { static void encode(DerOutputStream out, AlgorithmId algid, byte[] key) throws IOException { DerOutputStream tmp = new DerOutputStream(); - tmp.putInteger(new BigInt(version.toByteArray())); + tmp.putInteger(new BigInt(VERSION.toByteArray())); algid.encode(tmp); tmp.putOctetString(key); out.write(DerValue.tag_Sequence, tmp); |