using System;
using System.Collections;
+using System.Globalization;
using System.IO;
using System.Reflection;
using System.Security;
sp.LoadXml (xml);
}
SecurityElement root = sp.ToXml ();
- if ((root != null) && (root.Tag == "strongNames")) {
- SecurityElement mapping = root.SearchForChildByTag ("pubTokenMapping");
- if ((mapping != null) && (mapping.Children.Count > 0)) {
- LoadMapping (mapping);
- }
-
- SecurityElement settings = root.SearchForChildByTag ("verificationSettings");
- if ((settings != null) && (settings.Children.Count > 0)) {
- LoadVerificationSettings (settings);
+ if ((root != null) && (root.Tag == "configuration")) {
+ SecurityElement strongnames = root.SearchForChildByTag ("strongNames");
+ if ((strongnames != null) && (strongnames.Children.Count > 0)) {
+ SecurityElement mapping = strongnames.SearchForChildByTag ("pubTokenMapping");
+ if ((mapping != null) && (mapping.Children.Count > 0)) {
+ LoadMapping (mapping);
+ }
+
+ SecurityElement settings = strongnames.SearchForChildByTag ("verificationSettings");
+ if ((settings != null) && (settings.Children.Count > 0)) {
+ LoadVerificationSettings (settings);
+ }
}
}
}
string token = item.Attribute ("Token");
if ((token == null) || (token.Length != 16))
continue; // invalid entry
+ token = token.ToUpper (CultureInfo.InvariantCulture);
string publicKey = item.Attribute ("PublicKey");
if (publicKey == null)
string token = item.Attribute ("Token");
if (token == null)
continue; // bad entry
+ token = token.ToUpper (CultureInfo.InvariantCulture);
string assembly = item.Attribute ("Assembly");
if (assembly == null)
StringBuilder sb = new StringBuilder ();
sb.Append ("Public Key Token\tAssemblies\t\tUsers");
sb.Append (Environment.NewLine);
+ if (tokens == null) {
+ sb.Append ("none");
+ return sb.ToString ();
+ }
+
foreach (DictionaryEntry token in tokens) {
sb.Append ((string)token.Key);
Element t = (Element) token.Value;