fabric-client/lib/impl/CryptoSuite_ECDSA_AES.js
function makeRealPem(pem) {
	let result = null;
	if (typeof pem === 'string') {
		result = pem.replace(/-----BEGIN -----/, '-----BEGIN CERTIFICATE-----');
		result = result.replace(/-----END -----/, '-----END CERTIFICATE-----');
		result = result.replace(/-----([^-]+) ECDSA ([^-]+)-----([^-]*)-----([^-]+) ECDSA ([^-]+)-----/, '-----$1 EC $2-----$3-----$4 EC $5-----');
	}
	return result;
}
function makeRealPem(pem) {
	let result = null;
	if (typeof pem === 'string') {
		result = pem.replace(/-----BEGIN -----/, '-----BEGIN CERTIFICATE-----');
		result = result.replace(/-----END -----/, '-----END CERTIFICATE-----');
		result = result.replace(/-----([^-]+) ECDSA ([^-]+)-----([^-]*)-----([^-]+) ECDSA ([^-]+)-----/, '-----$1 EC $2-----$3-----$4 EC $5-----');
	}
	return result;
}
function makeRealPem ( pem ) { let result = null ; if ( typeof pem === 'string' ) { result = pem . replace ( / -----BEGIN ----- / , '-----BEGIN CERTIFICATE-----' ) ; result = result . replace ( / -----END ----- / , '-----END CERTIFICATE-----' ) ; result = result . replace ( / -----([^-]+) ECDSA ([^-]+)-----([^-]*)-----([^-]+) ECDSA ([^-]+)----- / , '-----$1 EC $2-----$3-----$4 EC $5-----' ) ; } return result ; }
Utilitly method to make sure the start and end markers are correct
Utilitly method to make sure the start and end markers are correct