You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I want to reenroll a user using fabric-ca-client CLI, it has this flag [--csr.keyrequest.reusekey] that makes the reenrolling process use the existing key pair of the user. However, the fabric-sdk-node doesn't seem to provide a similar option. The below snippet is taken from the reenroll function of FabricCAServices class:
// generate enrollment certificate pair for signing
let privateKey;
try {
privateKey = await this.getCryptoSuite().generateKey();
} catch (e) {
throw Error(`Failed to generate key for enrollment due to error [${e}]: ${e.stack}`);
}
// generate CSR using the subject of the current user's certificate
let csr;
try {
csr = privateKey.generateCSR('CN=' + subject);
} catch (e) {
throw Error(`Failed to generate CSR for enrollment due to error [${e}]`);
}
const response = await this._fabricCAClient.reenroll(csr, currentUser.getSigningIdentity(), attrReqs);
It generates a new pub/priv key for user when reenrolling. I suggest that the reenroll function accepts another parameter for specifying if the existing key pair need to be used or not.
The text was updated successfully, but these errors were encountered:
ih8d8
changed the title
Use the existing public and private key when reenrolling a user
Use the existing public and private keys when reenrolling a user
Oct 11, 2021
If I want to reenroll a user using fabric-ca-client CLI, it has this flag [--csr.keyrequest.reusekey] that makes the reenrolling process use the existing key pair of the user. However, the fabric-sdk-node doesn't seem to provide a similar option. The below snippet is taken from the
reenroll
function ofFabricCAServices
class:It generates a new pub/priv key for user when reenrolling. I suggest that the
reenroll
function accepts another parameter for specifying if the existing key pair need to be used or not.The text was updated successfully, but these errors were encountered: