We were seeing compilation errors like this:
```
System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs(71,20): error CS0135: `oid' conflicts with a declaration in a child block
System.Security.Cryptography.X509Certificates/X509EnhancedKeyUsageExtension.cs(74,17): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 38 warnings
make[9]: *** [../../class/lib/basic/secxml/System.dll] Error 1
```
The new foreach variables introduced in
4a6e5d24e174b9d2860300503b4a79396d7ae96d with the same "oid" name as the global constant apparently confused the older mcs compiler.
Rename them to avoid this.
_oid = new Oid (oid, friendlyName);
base.Critical = critical;
_enhKeyUsage = new OidCollection();
- foreach (Oid oid in enhancedKeyUsages) {
- _enhKeyUsage.Add(oid);
+ foreach (Oid o in enhancedKeyUsages) {
+ _enhKeyUsage.Add(o);
}
RawData = Encode ();
}
OidCollection oids = new OidCollection();
if (_enhKeyUsage != null) {
- foreach(Oid oid in _enhKeyUsage) {
- oids.Add(oid);
+ foreach(Oid o in _enhKeyUsage) {
+ oids.Add(o);
}
}
return oids;
internal byte[] Encode ()
{
ASN1 ex = new ASN1 (0x30);
- foreach (Oid oid in _enhKeyUsage) {
- ex.Add (ASN1Convert.FromOid (oid.Value));
+ foreach (Oid o in _enhKeyUsage) {
+ ex.Add (ASN1Convert.FromOid (o.Value));
}
return ex.GetBytes ();
}