61 static final SSLKeyAgreementGenerator ecdheKAGenerator = |
61 static final SSLKeyAgreementGenerator ecdheKAGenerator = |
62 new ECDHEKAGenerator(); |
62 new ECDHEKAGenerator(); |
63 static final SSLKeyAgreementGenerator ecdhKAGenerator = |
63 static final SSLKeyAgreementGenerator ecdhKAGenerator = |
64 new ECDHKAGenerator(); |
64 new ECDHKAGenerator(); |
65 |
65 |
66 static final class ECDHECredentials implements SSLCredentials { |
66 static final class ECDHECredentials implements SSLKeyAgreementCredentials { |
67 final ECPublicKey popPublicKey; |
67 final ECPublicKey popPublicKey; |
68 final NamedGroup namedGroup; |
68 final NamedGroup namedGroup; |
69 |
69 |
70 ECDHECredentials(ECPublicKey popPublicKey, NamedGroup namedGroup) { |
70 ECDHECredentials(ECPublicKey popPublicKey, NamedGroup namedGroup) { |
71 this.popPublicKey = popPublicKey; |
71 this.popPublicKey = popPublicKey; |
72 this.namedGroup = namedGroup; |
72 this.namedGroup = namedGroup; |
|
73 } |
|
74 |
|
75 @Override |
|
76 public PublicKey getPublicKey() { |
|
77 return popPublicKey; |
73 } |
78 } |
74 |
79 |
75 static ECDHECredentials valueOf(NamedGroup namedGroup, |
80 static ECDHECredentials valueOf(NamedGroup namedGroup, |
76 byte[] encodedPoint) throws IOException, GeneralSecurityException { |
81 byte[] encodedPoint) throws IOException, GeneralSecurityException { |
77 |
82 |