| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 6dd785d commit 285eb80
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -227,6 +227,7 @@ PublicKeyValues convertPublicKey(PGPPublicKey pgpPublicKey) | |||
| 227 | 227 | * @throws NoSuchAlgorithmException if no Provider supports an implementation for the PublicKeyValues algorithm | |
| 228 | 228 | * @throws InvalidKeySpecException if the PublicKeyValues specification is inappropriate to produce a public key | |
| 229 | 229 | */ | |
| 230 | + @SuppressWarnings("deprecation") | ||
| 230 | 231 | public PGPPublicKey convertPublicKey(PublicKeyValues pkVal, | |
| 231 | 232 | byte[] storedFingerprint, | |
| 232 | 233 | Date creationTime) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -70,7 +70,7 @@ static AsymmetricKeyParameter generatePublicKeyParameter(PublicKey key) | |||
| 70 | 70 | * when the request is not one this JDK version bridges - the caller then falls through to | |
| 71 | 71 | * its own handling. | |
| 72 | 72 | */ | |
| 73 | - static KeySpec getKeySpec(Key key, Class spec) | ||
| 73 | + static KeySpec getKeySpec(Key key, Class<?> spec) | ||
| 74 | 74 | throws InvalidKeySpecException | |
| 75 | 75 | { | |
| 76 | 76 | return null; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,7 +12,7 @@ public class SpecUtil | |||
| 12 | 12 | ||
| 13 | 13 | public static String getNameFrom(final AlgorithmParameterSpec paramSpec) | |
| 14 | 14 | { | |
| 15 | - return (String)AccessController.doPrivileged(new PrivilegedAction() | ||
| 15 | + return (String)AccessController.doPrivileged(new PrivilegedAction<Object>() | ||
| 16 | 16 | { | |
| 17 | 17 | public Object run() | |
| 18 | 18 | { | |
@@ -34,7 +34,7 @@ public Object run() | |||
| 34 | 34 | ||
| 35 | 35 | public static byte[] getContextFrom(final AlgorithmParameterSpec paramSpec) | |
| 36 | 36 | { | |
| 37 | - return (byte[])AccessController.doPrivileged(new PrivilegedAction() | ||
| 37 | + return (byte[])AccessController.doPrivileged(new PrivilegedAction<Object>() | ||
| 38 | 38 | { | |
| 39 | 39 | public Object run() | |
| 40 | 40 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,7 +18,7 @@ public static String getNameFrom(final AlgorithmParameterSpec paramSpec) | |||
| 18 | 18 | return ((NamedParameterSpec)paramSpec).getName(); | |
| 19 | 19 | } | |
| 20 | 20 | ||
| 21 | - return (String)AccessController.doPrivileged(new PrivilegedAction() | ||
| 21 | + return (String)AccessController.doPrivileged(new PrivilegedAction<Object>() | ||
| 22 | 22 | { | |
| 23 | 23 | public Object run() | |
| 24 | 24 | { | |
@@ -40,7 +40,7 @@ public Object run() | |||
| 40 | 40 | ||
| 41 | 41 | public static byte[] getContextFrom(final AlgorithmParameterSpec paramSpec) | |
| 42 | 42 | { | |
| 43 | - return (byte[])AccessController.doPrivileged(new PrivilegedAction() | ||
| 43 | + return (byte[])AccessController.doPrivileged(new PrivilegedAction<Object>() | ||
| 44 | 44 | { | |
| 45 | 45 | public Object run() | |
| 46 | 46 | { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -171,7 +171,7 @@ static AsymmetricKeyParameter generatePublicKeyParameter(PublicKey key) | |||
| 171 | 171 | * Return a KeySpec for a version-specific spec type - here the JDK 15+ EdEC key specs - | |
| 172 | 172 | * or null when the request is not one this JDK version bridges. | |
| 173 | 173 | */ | |
| 174 | - static KeySpec getKeySpec(Key key, Class spec) | ||
| 174 | + static KeySpec getKeySpec(Key key, Class<?> spec) | ||
| 175 | 175 | throws InvalidKeySpecException | |
| 176 | 176 | { | |
| 177 | 177 | if (spec.isAssignableFrom(EdECPrivateKeySpec.class)) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -62,7 +62,7 @@ | |||
| 62 | 62 | public class ExampleUtils | |
| 63 | 63 | { | |
| 64 | 64 | ||
| 65 | - private static Map algIds = new HashMap(); | ||
| 65 | + private static Map<String, AlgorithmIdentifier> algIds = new HashMap<String, AlgorithmIdentifier>(); | ||
| 66 | 66 | ||
| 67 | 67 | static | |
| 68 | 68 | { | |
@@ -232,7 +232,7 @@ public static X509Certificate createASignedCert( | |||
| 232 | 232 | certGen.setSubject(subjectDN); | |
| 233 | 233 | certGen.setStartDate(new Time(new Date(time - 24 * 60 * 60000))); | |
| 234 | 234 | certGen.setEndDate(new Time(new Date(time + 30 * 60 * 60000))); | |
| 235 | - certGen.setSignature((AlgorithmIdentifier)algIds.get(sigName)); | ||
| 235 | + certGen.setSignature(algIds.get(sigName)); | ||
| 236 | 236 | certGen.setSubjectPublicKeyInfo(subjectPublicKeyInfo); | |
| 237 | 237 | certGen.setExtensions(extGenerator.generate()); | |
| 238 | 238 | ||
@@ -248,7 +248,7 @@ public static X509Certificate createASignedCert( | |||
| 248 | 248 | ASN1EncodableVector v = new ASN1EncodableVector(); | |
| 249 | 249 | ||
| 250 | 250 | v.add(tbsCert); | |
| 251 | - v.add((AlgorithmIdentifier)algIds.get(sigName)); | ||
| 251 | + v.add(algIds.get(sigName)); | ||
| 252 | 252 | v.add(new DERBitString(sig.sign())); | |
| 253 | 253 | ||
| 254 | 254 | return (X509Certificate) | |
@@ -291,7 +291,7 @@ public static X509Certificate createSelfsignedCert( | |||
| 291 | 291 | certGen.setSubject(subjectDN); | |
| 292 | 292 | certGen.setStartDate(new Time(new Date(time - 24 * 60 * 60000))); | |
| 293 | 293 | certGen.setEndDate(new Time(new Date(time + 30 * 60 * 60000))); | |
| 294 | - certGen.setSignature((AlgorithmIdentifier)algIds.get(sigName)); | ||
| 294 | + certGen.setSignature(algIds.get(sigName)); | ||
| 295 | 295 | certGen.setSubjectPublicKeyInfo(subjectPublicKeyInfo); | |
| 296 | 296 | ||
| 297 | 297 | ||
@@ -306,7 +306,7 @@ public static X509Certificate createSelfsignedCert( | |||
| 306 | 306 | ASN1EncodableVector v = new ASN1EncodableVector(); | |
| 307 | 307 | ||
| 308 | 308 | v.add(tbsCert); | |
| 309 | - v.add((AlgorithmIdentifier)algIds.get(sigName)); | ||
| 309 | + v.add(algIds.get(sigName)); | ||
| 310 | 310 | v.add(new DERBitString(sig.sign())); | |
| 311 | 311 | ||
| 312 | 312 | return (X509Certificate) | |
| Back | FazBrowse Home | New Git URL |
0 commit comments