[
https://issues.apache.org/jira/browse/DIRKRB-193?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14384141#comment-14384141
]
Kai Zheng commented on DIRKRB-193:
----------------------------------
Hi Jiajia,
It looks great ! Just a minor in the test, please make the following functions
as private. Thanks.
{code}
+ public void setEncryptKey() {
+ KeyPair encryptionKeyPair = getKeyPair();
+ JwtTokenEncoder.setEncryptionKey((RSAPublicKey)
encryptionKeyPair.getPublic());
+ JwtTokenDecoder.setDecryptionKey((RSAPrivateKey)
encryptionKeyPair.getPrivate());
+ }
+
+ public KeyPair getKeyPair() {
+ KeyPairGenerator kpg = null;
+ try {
+ kpg = KeyPairGenerator.getInstance("RSA");
+ } catch (NoSuchAlgorithmException e) {
+ e.printStackTrace();
+ }
+ return kpg.generateKeyPair();
+ }
{code}
> Token decryption
> ----------------
>
> Key: DIRKRB-193
> URL: https://issues.apache.org/jira/browse/DIRKRB-193
> Project: Directory Kerberos
> Issue Type: New Feature
> Reporter: Kai Zheng
> Assignee: Jiajia Li
> Attachments: DIRKRB-193-V1.patch, DIRKRB-193-V2.patch
>
>
> In {{TokenPreauth}}, when KDC receives a token, it needs decryption of the
> token first for subsequent processing. The decryption key is the private key
> of the KDC server.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)