(KEYBase r, ECKeyInfo keyinfo)
| 507 | } |
| 508 | |
| 509 | private static PublicKey |
| 510 | toECDSAPublicKey(KEYBase r, ECKeyInfo keyinfo) throws IOException, |
| 511 | GeneralSecurityException, MalformedKeyException |
| 512 | { |
| 513 | DNSInput in = new DNSInput(r.getKey()); |
| 514 | |
| 515 | // RFC 6605 Section 4 |
| 516 | BigInteger x = readBigInteger(in, keyinfo.length); |
| 517 | BigInteger y = readBigInteger(in, keyinfo.length); |
| 518 | ECPoint q = new ECPoint(x, y); |
| 519 | |
| 520 | KeyFactory factory = KeyFactory.getInstance("EC"); |
| 521 | return factory.generatePublic(new ECPublicKeySpec(q, keyinfo.spec)); |
| 522 | } |
| 523 | |
| 524 | /** Converts a KEY/DNSKEY record into a PublicKey */ |
| 525 | static PublicKey |
no test coverage detected