provisioning/security/dice-provider-emulator/src/main/java/com/microsoft/azure/sdk/iot/provisioning/security/hsm/SecurityProviderDiceEmulator.java [188:205]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public String generateLeafCert(String uniqueId) throws SecurityProviderException
    {
        //SRS_SecurityClientDiceEmulator_25_012: [ This method shall throw SecurityProviderException if unique id is null or empty ]
        if (uniqueId == null || uniqueId.isEmpty())
        {
            throw new SecurityProviderException(new IllegalArgumentException("unique id cannot be null or empty"));
        }
        //SRS_SecurityClientDiceEmulator_25_012: [ This method shall return Leaf certificate generated by DICE with unique ID as common Name in PEM Format ]
        RIoT.CreateLeafCert(this.diceBundle, uniqueId);

        @SuppressWarnings("unused") // Used as a verification method.
        RIoT.DeviceAuthBundle diceBundleVerifier = RIoT.CreateDeviceAuthBundle(
                SEED,
                FWID,
                false,
                this.commonNameRoot, uniqueId, this.commonNameAlias);

        return this.diceBundle.LeafCertPem;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



provisioning/security/dice-provider/src/main/java/com/microsoft/azure/sdk/iot/provisioning/security/hsm/SecurityProviderDice.java [134:151]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public String generateLeafCert(String uniqueId) throws SecurityProviderException
    {
        //SRS_SecurityClientDiceEmulator_25_012: [ This method shall throw SecurityProviderException if unique id is null or empty ]
        if (uniqueId == null || uniqueId.isEmpty())
        {
            throw new SecurityProviderException(new IllegalArgumentException("unique id cannot be null or empty"));
        }
        //SRS_SecurityClientDiceEmulator_25_012: [ This method shall return Leaf certificate generated by DICE with unique ID as common Name in PEM Format ]
        RIoT.CreateLeafCert(this.diceBundle, uniqueId);

        @SuppressWarnings("unused") // Used as a verification method.
        RIoT.DeviceAuthBundle diceBundleVerifier = RIoT.CreateDeviceAuthBundle(
                SEED,
                FWID,
                false,
                this.commonNameRoot, uniqueId, this.commonNameAlias);

        return this.diceBundle.LeafCertPem;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



