+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-/*
- * The Item Layout has two modes depending on the number of text labels inserted into it.
- * Structure is depicted below.
- *
- * +------------------------------------------------------------------------+ ------
- * | | -> Item Margin
- * | +------+ +--------------------------------------------------------+ | ------
- * | | | | | |
- * | |CHECK | | TITLE | |
- * | | | | | |
- * | +------+ +--------------------------------------------------------+ |
- * +------------------------------------------------------------------------+
- * | |
- * | |
- * | |
- * Text Left Margin
- * | |
- * Text Right Margin
- *
- * +------------------------------------------------------------------------------+-------
- * | +-------------------------------------------------------------+ |
- * | +-------+ | TITLE | | Description Top Margin
- * | | | | | |
- * | |CHECK | +-------------------------------------------------------------+ |
- * | | | +-------------------------------------------------------------+ |-------
- * | +-------+ | DESCRIPTION | |
- * | | | |
- * | +-------------------------------------------------------------+ |
- * +------------------------------------------------------------------------------+
-*/
-
-namespace SettingMain
-{
- internal class ILCheckLabel : ItemLayout
- {
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-/*
- * The Item Layout has two modes depending on the number of text labels inserted into it.
- * Structure is depicted below.
- *
- * +------------------------------------------------------------------------+ ------
- * | | -> Item Margin
- * | +------+ +--------------------------------------------------------+ | ------
- * | | | | | |
- * | | ICON | | TITLE | |
- * | | | | | |
- * | +------+ +--------------------------------------------------------+ |
- * +------------------------------------------------------------------------+
- * | |
- * | |
- * | |
- * Text Left Margin
- * | |
- * Text Right Margin
- *
- * +------------------------------------------------------------------------------+-------
- * | +-------------------------------------------------------------+ |
- * | +-------+ | TITLE | | Description Top Margin
- * | | | | | |
- * | | ICON | +-------------------------------------------------------------+ |
- * | | | +-------------------------------------------------------------+ |-------
- * | +-------+ | DESCRIPTION | |
- * | | | |
- * | +-------------------------------------------------------------+ |
- * +------------------------------------------------------------------------------+
-*/
-
-namespace SettingMain
-{
- /// <summary>
- /// The custom layout sample implementation. This class creates layout for Item Object as it is depicted above.
- /// The custom layout must be derived from LayoutGroup and override the two methods, OnMeasure and OnLayout.
- /// OnMeasure and OnLayout methods must be extended and called during the measuring and layout phases respectively.
- /// </summary>
- internal class ILIconLabel : ItemLayout
- {
- }
-
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-
-/*
- * The Item Layout has two modes depending on the number of text labels inserted into it.
- * Structure is depicted below.
- *
- * +------------------------------------------------------------------------+ ------
- * | | -> Item Margin
- * | +------+ +--------------------------------------------------------+ | ------
- * | | | | | |
- * | | | | TITLE | |
- * | | | | | |
- * | +------+ +--------------------------------------------------------+ |
- * +------------------------------------------------------------------------+
- * | |
- * | |
- * | |
- * Text Left Margin
- * | |
- * Text Right Margin
- *
- * +------------------------------------------------------------------------------+-------
- * | +-------------------------------------------------------------+ |
- * | +-------+ | TITLE | | Description Top Margin
- * | | | | | |
- * | | | +-------------------------------------------------------------+ |
- * | | | +-------------------------------------------------------------+ |-------
- * | +-------+ | SLIDER | |
- * | | | |
- * | +-------------------------------------------------------------+ |
- * +------------------------------------------------------------------------------+
-*/
-
-namespace SettingMain
-{
- internal class ILLabelSlider : ItemLayout
- {
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-/*
- * The Item Layout has two modes depending on the number of text labels inserted into it.
- * Structure is depicted below.
- *
- * +------------------------------------------------------------------------+ ------
- * | | -> Item Margin
- * | +------+ +--------------------------------------------------------+ | ------
- * | | | | | |
- * | | ICON | | TITLE | |
- * | | | | | |
- * | +------+ +--------------------------------------------------------+ |
- * +------------------------------------------------------------------------+
- * | |
- * | |
- * | |
- * Text Left Margin
- * | |
- * Text Right Margin
- *
- * +------------------------------------------------------------------------------+-------
- * | +-------------------------------------------------------------+ |
- * | +-------+ | TITLE | | Description Top Margin
- * | | | | | |
- * | | ICON | +-------------------------------------------------------------+ |
- * | | | +-------------------------------------------------------------+ |-------
- * | +-------+ | DESCRIPTION | |
- * | | | |
- * | +-------------------------------------------------------------+ |
- * +------------------------------------------------------------------------------+
-*/
-
-namespace SettingMain
-{
- /// <summary>
- /// The custom layout sample implementation. This class creates layout for Item Object as it is depicted above.
- /// The custom layout must be derived from LayoutGroup and override the two methods, OnMeasure and OnLayout.
- /// OnMeasure and OnLayout methods must be extended and called during the measuring and layout phases respectively.
- /// </summary>
- internal class ItemLayout : LayoutGroup
- {
- /// <summary>
- /// Top margin of item contents.
- /// </summary>
- private const int ItemMargin = 5;
-
- /// <summary>
- /// Point where Description and Title begins.
- /// </summary>
- private const int TextLeftMargin = 120;
-
- /// <summary>
- /// Point where Description and Title ends.
- /// </summary>
- private const int TextRightMargin = 710;
-
- /// <summary>
- /// Vertical Description margin.
- /// </summary>
- private const int DescriptionTopMargin = 70;
-
- /// <summary>
- /// Height of a text object.
- /// </summary>
- private const int TextHeight = 50;
-
- /// <summary>
- /// Function calculates the layout size requirements using parent width and height measure specifications.
- /// </summary>
- /// <param name="widthMeasureSpec">Parent width measure specification</param>
- /// <param name="heightMeasureSpec">Parent height measure specification</param>
- protected override void OnMeasure(MeasureSpecification widthMeasureSpec, MeasureSpecification heightMeasureSpec)
- {
- var itemWidth = new LayoutLength(0);
- var itemHeight = new LayoutLength(0);
- var iconHeight = new LayoutLength(0);
-
- float labelMaxWidth = 0;
-
- //All layout items have to be measured to calculate Item width and height
- foreach (LayoutItem childLayout in LayoutChildren)
- {
- if (childLayout != null)
- {
- //Set widthMEasureSpecification and HeightMeasureSpecification for children
- MeasureChild(childLayout, widthMeasureSpec, heightMeasureSpec);
-
- //Item size depends of the content. If item contains descrpitoin height of the item is different.
- if (childLayout.Owner is TextLabel)
- {
- itemHeight += childLayout.MeasuredHeight.Size;
-
- if (childLayout.MeasuredWidth.Size.AsRoundedValue() > labelMaxWidth)
- {
- labelMaxWidth = childLayout.MeasuredWidth.Size.AsRoundedValue();
- }
- }
- else if (childLayout.Owner is CheckBox)
- {
- itemHeight += childLayout.MeasuredHeight.Size;
-
- if (childLayout.MeasuredWidth.Size.AsRoundedValue() > labelMaxWidth)
- {
- labelMaxWidth = childLayout.MeasuredWidth.Size.AsRoundedValue();
- }
- }
- else if (childLayout.Owner is Slider)
- {
- itemHeight += childLayout.MeasuredHeight.Size * 2;
-
- if (childLayout.MeasuredWidth.Size.AsRoundedValue() > labelMaxWidth)
- {
- labelMaxWidth = childLayout.MeasuredWidth.Size.AsRoundedValue();
- }
- }
- else
- {
- itemWidth += childLayout.MeasuredWidth.Size;
- iconHeight = childLayout.MeasuredHeight.Size;
- }
-
- //update item width by maximum label widht
- itemWidth += new LayoutLength(labelMaxWidth);
- }
- }
-
- if (iconHeight.AsRoundedValue() > itemHeight.AsRoundedValue())
- {
- itemHeight = iconHeight;
- }
-
- // Finally, call this method to set the dimensions we would like
- SetMeasuredDimensions(new MeasuredSize(itemWidth, MeasuredSize.StateType.MeasuredSizeOK),
- new MeasuredSize(itemHeight, MeasuredSize.StateType.MeasuredSizeOK));
- }
-
- /// <summary>
- /// Laying out and positioning the children within View itself using their measured sizes.
- /// </summary>
- /// <param name="changed">This is a new size or position for this layout.</param>
- /// <param name="left">Left position, relative to parent.</param>
- /// <param name="top"> Top position, relative to parent.</param>
- /// <param name="right">Right position, relative to parent.</param>
- /// <param name="bottom">Bottom position, relative to parent.</param>
- protected override void OnLayout(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom)
- {
- //Size have to be calculated for all childrens.
- foreach (LayoutItem childLayout in LayoutChildren)
- {
- //Layout owner name is used to set valid size values
- if (childLayout.Owner.Name == Program.ItemContentNameIcon)
- {
- LayoutLength width = childLayout.MeasuredWidth.Size;
- LayoutLength height = childLayout.MeasuredHeight.Size;
-
- childLayout.Layout(new LayoutLength(ItemMargin),
- new LayoutLength(ItemMargin),
- width + ItemMargin,
- height + ItemMargin);
- }
- else if (childLayout.Owner.Name == Program.ItemContentNameTitle)
- {
- childLayout.Layout(new LayoutLength(TextLeftMargin),
- new LayoutLength(ItemMargin),
- new LayoutLength(TextRightMargin),
- new LayoutLength(TextHeight + ItemMargin));
- }
- else if (childLayout.Owner.Name == Program.ItemContentNameDescription)
- {
- childLayout.Layout(new LayoutLength(TextLeftMargin),
- new LayoutLength(DescriptionTopMargin),
- new LayoutLength(TextRightMargin),
- new LayoutLength(DescriptionTopMargin + TextHeight + 3 * ItemMargin));
- }
- }
- }
-
- }
-}
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace SettingMain
-{
- public class ListItem
- {
- private readonly int ItemType = 0;
- private readonly string Path = null;
- private readonly string Label = null;
- private readonly string Description = null;
-
- public ListItem(int type, string path, string label, string description = "")
- {
- ItemType = type;
- Path = path;
- Label = label;
- Description = description;
- }
-
-
- public int GetItemType()
- {
- return ItemType;
- }
- public string GetPath()
- {
- return Path;
- }
-
- public string GetLabel()
- {
- return Label;
- }
-
- public string GetDescription()
- {
- return Description;
- }
- };
-}
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using System;
using System.Collections.Generic; // for Dictionary
using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.Applications;
-namespace SettingMain
+
+namespace SettingCertificates
{
public class Program : NUIWidgetApplication
{
-
- public static readonly string ItemContentNameIcon = "ItemIcon";
- public static readonly string ItemContentNameTitle = "ItemTitle";
- public static readonly string ItemContentNameDescription = "ItemDescription";
+ internal static readonly string LogTag = "SettingMain.Program";
public Program(Dictionary<System.Type, string> widgetSet) : base(widgetSet)
{
protected override void OnCreate()
{
base.OnCreate();
+ Tizen.Log.Debug(LogTag, "OnCreate SettingMain");
}
public void OnKeyEvent(object sender, Window.KeyEventArgs e)
static void Main(string[] args)
{
- Dictionary<System.Type, string> widgetSet = new Dictionary<Type, string>();
- widgetSet.Add(typeof(SettingWidget_MainMenu), "main@org.tizen.SettingMain");
- //widgetSet.Add(typeof(SettingWidget_AboutDevice), "aboutdevice@org.tizen.SettingMain");
+ Tizen.Log.Debug(LogTag, "Main SettingMain");
+ Dictionary<System.Type, string> widgetSet = new Dictionary<Type, string>
+ {
+ { typeof(WidgetSettingCertificates), "certificates@org.tizen.cssetting-certificates" }
+ };
var app = new Program(widgetSet);
app.Run(args);
}
<ItemGroup>
<PackageReference Include="Tizen.NET" Version="10.0.0.*" />
</ItemGroup>
+
+ <ItemGroup>
+ <Compile Update="res\locale\Resources.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.resx</DependentUpon>
+ </Compile>
+ <Compile Update="res\locale\Resources.en.Designer.cs">
+ <DesignTime>True</DesignTime>
+ <AutoGen>True</AutoGen>
+ <DependentUpon>Resources.en.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+
+ <ItemGroup>
+ <EmbeddedResource Update="res\locale\Resources.en.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.en.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ <EmbeddedResource Update="res\locale\Resources.resx">
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
</Project>
+++ /dev/null
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Collections.Generic; // for Dictionary
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.Applications;
-
-namespace SettingMain
-{
- class SettingWidget_AboutDevice : SettingWidget_Base
- {
- private static readonly ListItem[] listItems =
- {
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"sett_manage_cert_active_Default.png", "Manage certificate", ""),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"sett_legal_infot_active_Default.png", "Legal infomation", ""),
- new ListItem(1, "", "Device Info", ""),
- new ListItem(1, "", "Name", "Tizen"),
- new ListItem(1, "", "Model number", "rpi3"),
- new ListItem(1, "", "Tizen version", "TIZEN 6.5"),
- new ListItem(1, "", "CPU", "BCM2837"),
- new ListItem(1, "", "RAM", "4.0GB"),
- new ListItem(1, "", "Resolution", "1280 x 720"),
- new ListItem(1, "", "Status", "show network status and other infomation."),
- };
-
- public SettingWidget_AboutDevice()
- : base(listItems)
- {
- Tizen.Log.Error("SettingWidget", "AboutDevice \n");
- }
- }
-}
+++ /dev/null
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Collections.Generic;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.Applications;
-
-namespace SettingMain
-{
- class SettingWidget_Base : Widget
- {
- private static readonly string resPath = Tizen.Applications.Application.Current.DirectoryInfo.Resource;
- protected const string SETTING_LIST_ICON_PATH_CFG = "/list_icon/";
- protected ListItem[] mListItems;
-
- public SettingWidget_Base(ListItem[] listItems)
- : base()
- {
- Tizen.Log.Error("SettingWidget", "SettingWidget_Base \n");
- mListItems = listItems;
- }
- protected override void OnCreate(string contentInfo, Window window)
- {
- Bundle bundle = Bundle.Decode(contentInfo);
-
- mRootView = new View();
- mRootView.BackgroundColor = Color.White;
- mRootView.Size2D = window.Size;
- mRootView.PivotPoint = PivotPoint.Center;
- window.GetDefaultLayer().Add(mRootView);
-
- CreateVerticalScrollableBase(window);
-
- }
- private void CreateVerticalScrollableBase(Window window)
- {
- verticalScrollableBase = new ScrollableBase()
- {
- ScrollingDirection = ScrollableBase.Direction.Vertical,
- WidthSpecification = LayoutParamPolicies.MatchParent,
- HeightSpecification = LayoutParamPolicies.MatchParent,
- HideScrollbar = false,
- };
- verticalScrollableBase.ScrollOutOfBound += OnVerticalScrollOutOfBound;
-
- ListItem[] items = mListItems;
- verticalItems = new Button[items.Length];
- for (int i = 0; i < items.Length; i++)
- {
- verticalItems[i] = new Button
- {
- BackgroundColor = new Color(1.0f, 1.0f, 1.0f, 1.0f),
- Position = new Position(0, i * 80),
- Size = new Size(mRootView.Size2D.Width, 80),
- PointSize = 12.0f,
- TextColor = Color.Black,
- Layout = new LinearLayout()
- {
- LinearOrientation = LinearLayout.Orientation.Horizontal,
- VerticalAlignment = VerticalAlignment.Center,
- HorizontalAlignment = HorizontalAlignment.Begin,
- CellPadding = new Size2D(20, 20),
- },
-
- };
-
- string iconpath = items[i].GetPath();
- if (iconpath.Length > 0)
- {
- var margin1 = new View
- {
- Size2D = new Size2D(10, 32),
- HeightResizePolicy = ResizePolicyType.FillToParent
- };
- verticalItems[i].Add(margin1);
-
- ImageView icon = new ImageView(resPath + items[i].GetPath())
- {
- Size2D = new Size2D(32, 32),
- Name = Program.ItemContentNameIcon,
- };
- verticalItems[i].Add(icon);
- }
-
- var margin = new View
- {
- Size2D = new Size2D(10, 32),
- HeightResizePolicy = ResizePolicyType.FillToParent
- };
- verticalItems[i].Add(margin);
-
- PropertyMap titleStyle = new PropertyMap();
- titleStyle.Add("weight", new PropertyValue(600));
- TextLabel title = new TextLabel(items[i].GetLabel())
- {
- FontStyle = titleStyle,
- Name = Program.ItemContentNameTitle,
- Padding = new Extents(8, 8, 8, 8),
- };
- verticalItems[i].Add(title);
-
-
- if (i % 2 == 0)
- {
- verticalItems[i].BackgroundColor = Color.White;
- }
- else
- {
- verticalItems[i].BackgroundColor = Color.Cyan;
- }
-#if false
- var okButton = new Button()
- {
- Text = "OK",
- };
- okButton.Clicked += (object sender1, ClickedEventArgs e) => { window.GetDefaultNavigator().Pop(); };
-
- verticalItems[i].Clicked += (object sender, ClickedEventArgs e) =>
- {
- DialogPage.ShowAlertDialog("Clicked", verticalItems[i].Name, okButton);
- };
-#endif
-
- verticalScrollableBase.Add(verticalItems[i]);
- }
- mRootView.Add(verticalScrollableBase);
- }
-
- private void OnVerticalScrollOutOfBound(object sender, ScrollOutOfBoundEventArgs e)
- {
-#if false
- if (e.Displacement > 80)
- {
- if (e.PanDirection == ScrollOutOfBoundEventArgs.Direction.Down)
- {
- verticalItems[0].Text = $"Reached at the top, panned displacement is {e.Displacement}.";
- }
- }
- else if (0 - e.Displacement > 80)
- {
- if (e.PanDirection == ScrollOutOfBoundEventArgs.Direction.Up)
- {
- verticalItems[mListItems.Length - 1].Text = $"Reached at the bottom, panned displacement is {e.Displacement}.";
- }
- }
-#endif
- }
-
- protected override void OnPause()
- {
- base.OnPause();
- }
-
- protected override void OnResume()
- {
- Tizen.Log.Error("widget", "OnResume \n");
- base.OnResume();
- }
-
- protected override void OnResize(Window window)
- {
- base.OnResize(window);
- }
-
- protected override void OnTerminate(string contentInfo, TerminationType type)
- {
- base.OnTerminate(contentInfo, type);
- }
-
- protected override void OnUpdate(string contentInfo, int force)
- {
- base.OnUpdate(contentInfo, force);
- }
-
- protected View mRootView;
- protected ScrollableBase verticalScrollableBase = null;
- protected Button[] verticalItems;
- }
-}
-
+++ /dev/null
-using System;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Collections.Generic;
-using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-using Tizen.Applications;
-
-namespace SettingMain
-{
- class SettingWidget_MainMenu : SettingWidget_Base
- {
- private static readonly ListItem[] mItems = {
- // Connections
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wifi.png", "Wifi","Wifi"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_bluetooth.png", "Bluetooth","Bluetooth"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wifi.png", "Wired Network","Wired Network"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wifi.png", "Tethering","Tethering"),
-
- // Sound
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_sound_and_notifications.png", "Sound","Sound"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_notifications.png", "Notifications","Notifications"),
-
- // Display
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_display.png", "Display","Display"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_wallpapers.png", "Wallpaper","Wallpaper"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_softkey.png", "Tray","Tray"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_softkey.png", "Screen Mirroring","Screen Mirroring"),
-
- // Personal
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_account.png", "Accounts","Accounts"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_privacy_and_safety.png", "Privacy","Privacy"),
-
- // Memory
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_applications.png", "Apps","Applications"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_storage.png", "Storage","Storage"),
-
- // System
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_language_and_input.png", "Language and input","Language and input"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_date_and_time.png", "Date and time","Date and time"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_reset.png", "Reset","Reset"),
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_accessibility.png", "Accessibility","Accessibility"),
-
- // Device
- new ListItem(1, SETTING_LIST_ICON_PATH_CFG+"settings_about_device.png", "About device","About device"),
- };
-
- public SettingWidget_MainMenu()
- :base(mItems)
- {
- Tizen.Log.Error("SettingWidget", "Main menu \n");
- }
- }
-
-}
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using SettingPrivacy.res.locale;
+using System;
+using System.Collections.Generic;
+using Tizen.Applications;
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using static Interop;
+using static Interop.CertSvc;
+
+namespace SettingCertificates
+{
+ class WidgetSettingCertificates : Widget
+ {
+ protected View _rootView = null;
+ List<certificateMetadata> _rootCA, _userCert;
+ private Navigator _navigator;
+ internal static string LogTag = "SettingMain.Certificate";
+
+ public WidgetSettingCertificates() : base()
+ {
+ }
+ void log(string str)
+ {
+ Tizen.Log.Debug(LogTag, str);
+ }
+ protected override void OnCreate(string contentInfo, Window window)
+ {
+ Bundle bundle = Bundle.Decode(contentInfo);
+ CreateCertList();
+ _rootView = new View();
+ _rootView.BackgroundColor = Color.White;
+ _rootView.Size2D = window.Size;
+ _rootView.PivotPoint = PivotPoint.Center;
+ window.GetDefaultLayer().Add(_rootView);
+ _navigator = window.GetDefaultNavigator();
+ _navigator.Push(CreateFirstPage());
+
+ }
+ private ContentPage CreateFirstPage()
+ {
+ ScrollableBase content = CreateScrollableBase();
+ var rootCert = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Text = Resources.IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB/*"Trusted root CA certificates"*/,
+ IsSelectable = false,
+ Margin = new Extents(20, 20, 1, 1),
+ BackgroundColor = Color.White,
+ };
+
+ rootCert.Clicked += (o, e) =>
+ {
+ _navigator.Push(CreateSecondPage(Resources.IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB/*"Trusted root CA certificates"*/, _rootCA));
+ };
+ content.Add(rootCert);
+ var userCert = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Text = Resources.IDS_ST_BODY_USER_CERTIFICATES/*"User certificates"*/,
+ IsSelectable = false,
+ Margin = new Extents(20, 20, 1, 1),
+ BackgroundColor = Color.White,
+ CornerRadius = new Vector4(10, 10, 10, 10)
+ };
+
+ userCert.Clicked += (o, e) =>
+ {
+ _navigator.Push(CreateSecondPage(Resources.IDS_ST_BODY_USER_CERTIFICATES/*"User certificates"*/, _userCert));
+ };
+ content.Add(userCert);
+
+ ContentPage firstPage = CreateContentPage(Resources.IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB/*"Manage certificates"*/, content);
+ firstPage.AppBar.AutoNavigationContent = false;
+
+ var navigationContent = new Button(((AppBarStyle)ThemeManager.GetStyle("Tizen.NUI.Components.AppBar")).BackButton);
+ navigationContent.Clicked += (o, e) =>
+ {
+ Bundle bundle = new Bundle();
+ bundle.AddItem("WIDGET_ACTION", "POP");
+ SetContentInfo(bundle.Encode());
+ };
+ firstPage.AppBar.NavigationContent = navigationContent;
+
+ return firstPage;
+ }
+ private ContentPage CreateSecondPage(string title, List<certificateMetadata> certificates)
+ {
+ ScrollableBase content = CreateScrollableBase();
+ content.BackgroundColor = new Color("#EFEFEF");
+ foreach (certificateMetadata cert in certificates)
+ {
+ var item = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Text = cert.title,
+ IsSelectable = false,
+ Margin = new Extents(20, 20, 1, 1),
+ BackgroundColor = Color.White,
+ CornerRadius = new Vector4(10, 10, 10, 10)
+ };
+
+ item.Clicked += (o, e) =>
+ {
+ _navigator.Push(CreateCertDetails(cert));
+ };
+ content.Add(item);
+ }
+ return CreateContentPage(title, content);
+ }
+ private ContentPage CreateCertDetails(certificateMetadata cert)
+ {
+ ScrollableBase content = CreateScrollableBase();
+ content.BackgroundColor = new Color("#EFEFEF");
+ const float fieldTitleFontScale = 1.2F;
+ const float titleFontScale = 1.1F;
+ PropertyMap titleFontStyle = new PropertyMap();
+ titleFontStyle.Add("weight", new PropertyValue("bold"));
+ /* Use Certificate */
+ var item = new DefaultLinearItem()
+ {
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ Text = " " + "Use certificate", // NOT defined in Resources...
+ IsSelectable = false,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ CornerRadius = new Vector4(10, 10, 10, 10)
+ };
+ content.Add(item);
+ /* Owner Certificate */
+ TextLabel ownerLabel = new TextLabel()
+ {
+ Text = " " + Resources.IDS_SCP_BODY_OWNER_ABB/*"Owner"*/,
+ Margin = new Extents(20, 20, 6, 6),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontSizeScale = titleFontScale,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(ownerLabel);
+ foreach (CertificateField field in new CertificateField[] { CertificateField.CERTSVC_SUBJECT_COMMON_NAME, CertificateField.CERTSVC_SUBJECT_ORGANIZATION_NAME })
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + cert.GetFieldTitle(field),
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + cert.GetField(field),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ /* Issuer Certificate */
+ TextLabel issuerLabel = new TextLabel()
+ {
+ Text = " " + Resources.IDS_ST_BODY_ISSUER/*"Issuer"*/,
+ Margin = new Extents(20, 20, 6, 6),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontSizeScale = titleFontScale,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(issuerLabel);
+ foreach (CertificateField field in new CertificateField[] { CertificateField.CERTSVC_ISSUER_COMMON_NAME, CertificateField.CERTSVC_ISSUER_ORGANIZATION_NAME })
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + cert.GetFieldTitle(field),
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + cert.GetField(field),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ /* Issuer Certificate information */
+ TextLabel certInfo = new TextLabel()
+ {
+ Text = " " + Resources.IDS_ST_BODY_CERTIFICATE_INFORMATION/*"Certificate information"*/,
+ Margin = new Extents(20, 20, 6, 6),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontSizeScale = titleFontScale,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(certInfo);
+ foreach (CertificateField field in new CertificateField[] { CertificateField.CERTSVC_VERSION })
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + cert.GetFieldTitle(field),
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + cert.GetField(field),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + Resources.IDS_ST_BODY_VALID_FROM_C/*"Valid from:"*/,
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + cert.before.ToString("U"),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + Resources.IDS_ST_BODY_VALID_TO_C/*"Valid to:"*/,
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + cert.after.ToString("U"),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ foreach (CertificateField field in new CertificateField[] { CertificateField.CERTSVC_SERIAL_NUMBER, CertificateField.CERTSVC_SIGNATURE_ALGORITHM,
+ CertificateField.CERTSVC_KEY_USAGE })
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + cert.GetFieldTitle(field),
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + cert.GetField(field),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ {
+ string txt = Resources.IDS_ST_BODY_FALSE/*"False"*/;
+ if (cert.rootCa == 1)
+ {
+ txt = Resources.IDS_ST_BODY_TRUE/*"True"*/;
+ }
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + Resources.IDS_ST_BODY_CERTIFICATION_AUTHORITY_C/*"Certification authority:"*/,
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ Text = " " + txt,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+ {
+ TextLabel fieldTitle = new TextLabel()
+ {
+ Text = " " + cert.GetFieldTitle(CertificateField.CERTSVC_KEY),
+ FontSizeScale = fieldTitleFontScale,
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ };
+ TextLabel fieldValue = new TextLabel()
+ {
+ MultiLine = true,
+ Text = cert.GetField(CertificateField.CERTSVC_KEY).Replace(" ", " "),
+ BackgroundColor = Color.White,
+ Margin = new Extents(20, 20, 1, 0),
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ FontStyle = titleFontStyle,
+ CornerRadius = new Vector4(0, 0, 10, 10),
+ };
+ content.Add(fieldTitle);
+ content.Add(fieldValue);
+ }
+
+ return CreateContentPage(Resources.IDS_ST_BODY_CERTIFICATE_DETAILS/*"Certificate details"*/, content);
+ }
+ bool CreateCertList()
+ {
+ log("create instance");
+ int result = CertSvc.InstanceNew(out IntPtr instance);
+ if ((CertSvc.ErrorCode)result != CertSvc.ErrorCode.CERTSVC_SUCCESS)
+ {
+ log("unable to create cert instance, result: " + result.ToString());
+ return false;
+ }
+ log("Instance created");
+ result = CertSvc.GetPKCS12CertificateListFromStore(instance, CertSvc.CertStoreType.ALL_STORE, 0, out IntPtr storeCertList, out int length);
+ if ((CertSvc.ErrorCode)result != CertSvc.ErrorCode.CERTSVC_SUCCESS)
+ {
+ log("unable to get root certificates, result: " + result.ToString());
+ result = CertSvc.FreePKCS12CertificateListFromStore(instance, out storeCertList);
+ if ((CertSvc.ErrorCode)result != CertSvc.ErrorCode.CERTSVC_SUCCESS)
+ {
+ log("unable to free certlist, result: " + result.ToString());
+ }
+ CertSvc.InstanceFree(instance);
+ return false;
+ }
+ log("All store length: " + length);
+ _rootCA = CertSvc.GetCertLists(instance, storeCertList, length);
+
+ result = CertSvc.FreePKCS12CertificateListFromStore(instance, out storeCertList);
+ if ((CertSvc.ErrorCode)result != CertSvc.ErrorCode.CERTSVC_SUCCESS)
+ {
+ log("unalbe to free certlist, result: " + result.ToString());
+ }
+ result = CertSvc.GetPKCS12UserCertificateListFromStore(instance, CertStoreType.ALL_STORE, out IntPtr user, out int ul);
+ if ((CertSvc.ErrorCode)result != CertSvc.ErrorCode.CERTSVC_SUCCESS)
+ {
+ log("unable to get user certificate list, result: " + result.ToString());
+ }
+ log("User length: " + ul);
+ _userCert = CertSvc.GetCertLists(instance, user, ul);
+ result = CertSvc.FreePKCS12CertificateListFromStore(instance, out user);
+ if ((CertSvc.ErrorCode)result != CertSvc.ErrorCode.CERTSVC_SUCCESS)
+ {
+ log("unalbe to free user certlist, result: " + result.ToString());
+ }
+ CertSvc.InstanceFree(instance);
+ return true;
+ }
+ private ScrollableBase CreateScrollableBase()
+ {
+ return new ScrollableBase()
+ {
+ ScrollingDirection = ScrollableBase.Direction.Vertical,
+ WidthSpecification = LayoutParamPolicies.MatchParent,
+ HeightSpecification = LayoutParamPolicies.MatchParent,
+ HideScrollbar = false,
+ Layout = new LinearLayout()
+ {
+ LinearOrientation = LinearLayout.Orientation.Vertical,
+ },
+ };
+ }
+ private ContentPage CreateContentPage(string title, ScrollableBase content)
+ {
+ log("CreateContentPage with title: " + title);
+ return new ContentPage()
+ {
+ AppBar = new AppBar()
+ {
+ Title = title,
+ },
+ Content = content,
+ BackgroundColor = new Color("#EFEFEF"),
+ };
+ }
+
+ private void OnVerticalScrollOutOfBound(object sender, ScrollOutOfBoundEventArgs e)
+ {
+#if false
+ if (e.Displacement > 80)
+ {
+ if (e.PanDirection == ScrollOutOfBoundEventArgs.Direction.Down)
+ {
+ verticalItems[0].Text = $"Reached at the top, panned displacement is {e.Displacement}.";
+ }
+ }
+ else if (0 - e.Displacement > 80)
+ {
+ if (e.PanDirection == ScrollOutOfBoundEventArgs.Direction.Up)
+ {
+ verticalItems[mListItems.Length - 1].Text = $"Reached at the bottom, panned displacement is {e.Displacement}.";
+ }
+ }
+#endif
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using System;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Reflection;
+using System.Linq;
+using SettingPrivacy.res.locale;
+
+internal static partial class Interop
+{
+ internal static partial class CertSvc
+ {
+ internal static string LogTag = "InteropTest.CertSvc";
+ internal enum ErrorCode
+ {
+ CERTSVC_TRUE = 1,
+ CERTSVC_FALSE = 0,
+ CERTSVC_SUCCESS = 1,
+ CERTSVC_FAIL = 0,
+ CERTSVC_BAD_ALLOC = -2,
+ CERTSVC_WRONG_ARGUMENT = -4,
+ CERTSVC_INVALID_ALGORITHM = -5,
+ CERTSVC_INVALID_SIGNATURE = -6,
+ CERTSVC_IO_ERROR = -7,
+ CERTSVC_INVALID_PASSWORD = -8,
+ CERTSVC_DUPLICATED_ALIAS = -9,
+ CERTSVC_ALIAS_DOES_NOT_EXIST = -10,
+ CERTSVC_INVALID_STORE_TYPE = -11,
+ CERTSVC_INVALID_STATUS = -12,
+ CERTSVC_INVALID_CERTIFICATE = -13,
+ };
+ internal enum CertStoreType
+ {
+ NONE_STORE = 0,
+ VPN_STORE = 1 << 0,
+ WIFI_STORE = 1 << 1,
+ EMAIL_STORE = 1 << 2,
+ SYSTEM_STORE = 1 << 3,
+ ALL_STORE = VPN_STORE | WIFI_STORE | EMAIL_STORE | SYSTEM_STORE,
+ };
+ internal enum CertificateField
+ {
+ CERTSVC_SUBJECT,
+ [Description("Common name")]
+ CERTSVC_SUBJECT_COMMON_NAME,
+ CERTSVC_SUBJECT_COUNTRY_NAME,
+ CERTSVC_SUBJECT_STATE_NAME,
+ CERTSVC_SUBJECT_LOCALITY_NAME,
+ [Description("Organization")]
+ CERTSVC_SUBJECT_ORGANIZATION_NAME,
+ CERTSVC_SUBJECT_ORGANIZATION_UNIT_NAME,
+ CERTSVC_SUBJECT_EMAIL_ADDRESS,
+ /* CERTSVC_SUBJECT_UID, */
+ CERTSVC_ISSUER,
+ [Description("Common name")]
+ CERTSVC_ISSUER_COMMON_NAME,
+ CERTSVC_ISSUER_COUNTRY_NAME,
+ CERTSVC_ISSUER_STATE_NAME,
+ CERTSVC_ISSUER_LOCALITY_NAME,
+ [Description("Organization")]
+ CERTSVC_ISSUER_ORGANIZATION_NAME,
+ CERTSVC_ISSUER_ORGANIZATION_UNIT_NAME,
+ CERTSVC_ISSUER_EMAIL_ADDRESS,
+ /* CERTSVC_ISSUER_UID, */
+ [Description("Version")]
+ CERTSVC_VERSION,
+ [Description("Serial number")]
+ CERTSVC_SERIAL_NUMBER,
+ [Description("Key usage")]
+ CERTSVC_KEY_USAGE,
+ [Description("Public key")]
+ CERTSVC_KEY,
+ CERTSVC_KEY_ALGO,
+ [Description("Signature algorithm")]
+ CERTSVC_SIGNATURE_ALGORITHM,
+ };
+ public static string GetCertFieldDescription(CertificateField field)
+ {
+ Type genericEnumType = field.GetType();
+ MemberInfo[] memberInfo = genericEnumType.GetMember(field.ToString());
+ if ((memberInfo != null && memberInfo.Length > 0))
+ {
+ var _Attribs = memberInfo[0].GetCustomAttributes(typeof(System.ComponentModel.DescriptionAttribute), false);
+ if ((_Attribs != null && _Attribs.Count() > 0))
+ {
+ return ((System.ComponentModel.DescriptionAttribute)_Attribs.ElementAt(0)).Description;
+ }
+ }
+ return field.ToString();
+ }
+
+ internal enum CertStatus
+ {
+ DISABLED = 0,
+ ENABLED = 1,
+ };
+ [StructLayout(LayoutKind.Sequential)]
+ internal struct StoreCertList
+ {
+ internal IntPtr gname;
+ internal IntPtr title;
+ internal CertStatus status;
+ internal CertStoreType storeType;
+ internal IntPtr next;
+ }
+ internal class certificateMetadata
+ {
+ internal string gname;
+ internal string title;
+ internal CertStatus status;
+ internal CertStoreType storeType;
+ internal string[] fields;
+ internal DateTime before;
+ internal DateTime after;
+ internal int rootCa;
+ public certificateMetadata()
+ {
+ fields = new string[Enum.GetNames(typeof(CertificateField)).Length];
+ }
+ public string GetField(CertificateField field)
+ {
+ return fields[(int)field];
+ }
+ public string GetFieldTitle(CertificateField field)
+ {
+ switch (field)
+ {
+ case CertificateField.CERTSVC_SUBJECT_COMMON_NAME:
+ return Resources.IDS_ST_BODY_COMMON_NAME_C; /*Common name*/
+ case CertificateField.CERTSVC_SUBJECT_ORGANIZATION_NAME:
+ return Resources.IDS_ST_BODY_ORGANISATION_C; /*Organization*/
+ case CertificateField.CERTSVC_ISSUER_COMMON_NAME:
+ return Resources.IDS_ST_BODY_ISSUER_COLON; /*Common name*/
+ case CertificateField.CERTSVC_ISSUER_ORGANIZATION_NAME:
+ return Resources.IDS_ST_BODY_ORGANISATION_C; /*Organization*/
+ case CertificateField.CERTSVC_VERSION:
+ return Resources.IDS_ST_BODY_VERSION_C; /*Version*/
+ case CertificateField.CERTSVC_SERIAL_NUMBER:
+ return Resources.IDS_ST_BODY_SERIAL_NUMBER_COLON; /*Serial number*/
+ case CertificateField.CERTSVC_KEY_USAGE:
+ return Resources.IDS_ST_BODY_KEY_USAGE_C; /*Key usage*/
+ case CertificateField.CERTSVC_KEY:
+ return Resources.IDS_ST_BODY_PUBLIC_KEY_C; /*Public key*/
+ case CertificateField.CERTSVC_SIGNATURE_ALGORITHM:
+ return Resources.IDS_ST_BODY_SIGNATURE_ALGORITHM_C; /*Signature algorithm*/
+
+ default:
+ break;
+ }
+ return GetCertFieldDescription(field);
+ }
+ }
+
+ internal struct StoreCertHandle
+ {
+ string name;
+ string title;
+ CertStatus status;
+ CertStoreType storeType;
+ }
+ internal struct Certificate
+ {
+ internal int privateHandler;
+ internal Instance Instance;
+ }
+
+ internal struct Instance
+ {
+ internal IntPtr privatePtr;
+ }
+
+ internal struct CertSvcString
+ {
+ internal IntPtr privateHandler;
+ internal int privateLength;
+ internal Instance Instance;
+ }
+ /*
+ // cert UI:
+ Owner:
+ Common name:
+ Organization:
+ Issuer:
+ Common name:
+ Organization:
+ Certificate Information:
+ Version:
+ Valid from:
+ Valid to:
+ Serial number:
+ Signature algorithm:
+ Key Usage:
+ Certification authority:
+ Public Key:
+
+ */
+
+ internal static List<certificateMetadata> GetCertLists(IntPtr instance, IntPtr certList, int length)
+ {
+ IntPtr cur = certList;
+ var list = new List<certificateMetadata>();
+
+ while (cur != IntPtr.Zero)
+ {
+ StoreCertList item = Marshal.PtrToStructure<Interop.CertSvc.StoreCertList>(cur);
+ certificateMetadata cert = new certificateMetadata
+ {
+ status = item.status,
+ gname = Marshal.PtrToStringUTF8(item.gname),
+ title = Marshal.PtrToStringUTF8(item.title),
+ storeType = item.storeType
+ };
+ ErrorCode err = (ErrorCode)GetPKCS12CertificateFromStore(instance, item.storeType, item.gname, out Certificate cout);
+ if (err != ErrorCode.CERTSVC_SUCCESS)
+ {
+ Tizen.Log.Debug(LogTag, "Unable to GetPKCS12CertificateFromStore, err: " + err + ", instance: "
+ + instance + " gname: " + item.gname + " store_type: " + item.storeType);
+ cur = item.next;
+ continue;
+ }
+
+ err = (ErrorCode)GetCertificateNotAfter(cout, out long time);
+ if (err != ErrorCode.CERTSVC_SUCCESS)
+ {
+ Tizen.Log.Debug(LogTag, "Unable to GetCertificateNotAfter, , err: " + err + ", instance: "
+ + instance + " gname: " + item.gname + " store_type: " + item.storeType);
+ cur = item.next;
+ continue;
+ }
+ cert.after = new DateTime(1970, 1, 1).ToLocalTime().AddSeconds(time);
+ err = (ErrorCode)GetCertificateNotBefore(cout, out time);
+ if (err != ErrorCode.CERTSVC_SUCCESS)
+ {
+ Tizen.Log.Debug(LogTag, "Unable to GetCertificateNotBefore, , err: " + err + ", instance: "
+ + instance + " gname: " + item.gname + " store_type: " + item.storeType);
+ cur = item.next;
+ continue;
+ }
+ cert.before = new DateTime(1970, 1, 1).ToLocalTime().AddSeconds(time);
+ err = (ErrorCode)GetCertificateIsRootCa(cout, out int isRootCa);
+ if (err != ErrorCode.CERTSVC_SUCCESS)
+ {
+ Tizen.Log.Debug(LogTag, "Unable to GetCertificateIsRootCa, , err: " + err + ", instance: "
+ + instance + " gname: " + item.gname + " store_type: " + item.storeType);
+ cur = item.next;
+ continue;
+ }
+ cert.rootCa = isRootCa;
+ bool gotError = false;
+ foreach (CertificateField certificateField in Enum.GetValues(typeof(CertificateField)))
+ {
+ err = (ErrorCode)GetCertificateStringField(cout, certificateField, out CertSvcString certSvcString);
+ if (err != ErrorCode.CERTSVC_SUCCESS)
+ {
+ Tizen.Log.Debug(LogTag, "Unable to GetCertificateStringField, , err: " + err + ", instance: "
+ + instance + " gname: " + item.gname + " store_type: " + item.storeType);
+ cur = item.next;
+ gotError = true;
+ break;
+ }
+ string stringField = Marshal.PtrToStringUTF8(certSvcString.privateHandler);
+ cert.fields[(int)certificateField] = stringField;
+ }
+ if (gotError == true)
+ {
+ continue;
+ }
+ cur = item.next;
+ list.Add(cert);
+ }
+ Tizen.Log.Debug(LogTag, "CertList size: " + list.Count);
+ return list;
+ }
+
+ // int certsvc_instance_new(CertSvcInstance *instance);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_instance_new")]
+ internal static extern int InstanceNew(out IntPtr instance);
+ // void certsvc_instance_free(CertSvcInstance instance);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_instance_free")]
+ internal static extern void InstanceFree(IntPtr instance);
+ // int certsvc_pkcs12_get_certificate_list_from_store(CertSvcInstance instance, CertStoreType storeType, int is_root_app, CertSvcStoreCertList **certlist, size_t *lenght);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_pkcs12_get_certificate_list_from_store")]
+ internal static extern int GetPKCS12CertificateListFromStore(IntPtr instance, CertStoreType storeType, int isRootApp, out IntPtr certList, out int length);
+ // int certsvc_pkcs12_free_certificate_list_from_store(CertSvcInstance instance, CertSvcStoreCertList **certlist);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_pkcs12_free_certificate_list_loaded_from_store")]
+ internal static extern int FreePKCS12CertificateListFromStore(IntPtr instance, out IntPtr certList);
+ // int certsvc_pkcs12_get_certificate_from_store(CertSvcInstance instance, CertStoreType storeType, const char* gname, CertSvcCertificate *certificate);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_pkcs12_get_certificate_from_store")]
+ internal static extern int GetPKCS12CertificateFromStore(IntPtr instance, CertStoreType storeType, IntPtr gname, out Certificate certificate);
+
+ // int certsvc_certificate_get_string_field(CertSvcCertificate certificate, CertSvcCertificateField field, CertSvcString *buffer);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_certificate_get_string_field")]
+ internal static extern int GetCertificateStringField(Certificate certificate, CertificateField field, out CertSvcString buffer);
+ // int certsvc_certificate_get_not_after(CertSvcCertificate certificate, time_t *result);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_certificate_get_not_after")]
+ internal static extern int GetCertificateNotAfter(Certificate certificate, out long result);
+ // int certsvc_certificate_get_not_before(CertSvcCertificate certificate, time_t *result);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_certificate_get_not_before")]
+ internal static extern int GetCertificateNotBefore(Certificate certificate, out long result);
+ // int certsvc_certificate_is_root_ca(CertSvcCertificate certificate, int *result);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_certificate_is_root_ca")]
+ internal static extern int GetCertificateIsRootCa(Certificate certificate, out int status);
+
+ /* END USER API */
+ // int certsvc_pkcs12_get_end_user_certificate_list_from_store(CertSvcInstance instance, CertStoreType storeType, CertSvcStoreCertList **certlist, size_t *lenght);
+ [DllImport(Libraries.CertSvc, EntryPoint = "certsvc_pkcs12_get_end_user_certificate_list_from_store")]
+ internal static extern int GetPKCS12UserCertificateListFromStore(IntPtr instance, CertStoreType storeType, out IntPtr certList, out int length);
+
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+internal static partial class Interop
+{
+ internal static partial class Libraries
+ {
+ public const string CertSvc = "libcert-svc-vcore.so.2";
+ }
+}
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+//------------------------------------------------------------------------------
+// <auto-generated>
+// 이 코드는 도구를 사용하여 생성되었습니다.
+// 런타임 버전:4.0.30319.42000
+//
+// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
+// 이러한 변경 내용이 손실됩니다.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SettingPrivacy.res.locale
+{
+ using System;
+
+
+ /// <summary>
+ /// 지역화된 문자열 등을 찾기 위한 강력한 형식의 리소스 클래스입니다.
+ /// </summary>
+ // 이 클래스는 ResGen 또는 Visual Studio와 같은 도구를 통해 StronglyTypedResourceBuilder
+ // 클래스에서 자동으로 생성되었습니다.
+ // 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
+ // 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources
+ {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources()
+ {
+ }
+
+ /// <summary>
+ /// 이 클래스에서 사용하는 캐시된 ResourceManager 인스턴스를 반환합니다.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager
+ {
+ get
+ {
+ if (object.ReferenceEquals(resourceMan, null))
+ {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SettingCertificates.res.locale.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// 이 강력한 형식의 리소스 클래스를 사용하여 모든 리소스 조회에 대해 현재 스레드의 CurrentUICulture 속성을
+ /// 재정의합니다.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture
+ {
+ get
+ {
+ return resourceCulture;
+ }
+ set
+ {
+ resourceCulture = value;
+ }
+ }
+ internal static string IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_USER_CERTIFICATES
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_USER_CERTIFICATES", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB", resourceCulture);
+ }
+ }
+ internal static string IDS_SCP_BODY_OWNER_ABB
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_SCP_BODY_OWNER_ABB", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_ISSUER
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_ISSUER", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_CERTIFICATE_INFORMATION
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_CERTIFICATE_INFORMATION", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_VALID_FROM_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_VALID_FROM_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_VALID_TO_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_VALID_TO_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_CERTIFICATION_AUTHORITY_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_CERTIFICATION_AUTHORITY_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_TRUE
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_TRUE", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_FALSE
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_FALSE", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_CERTIFICATE_DETAILS
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_CERTIFICATE_DETAILS", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_COMMON_NAME_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_COMMON_NAME_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_ORGANISATION_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_ORGANISATION_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_ISSUER_COLON
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_ISSUER_COLON", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_VERSION_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_VERSION_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_SERIAL_NUMBER_COLON
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_SERIAL_NUMBER_COLON", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_KEY_USAGE_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_KEY_USAGE_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_PUBLIC_KEY_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_PUBLIC_KEY_C", resourceCulture);
+ }
+ }
+ internal static string IDS_ST_BODY_SIGNATURE_ALGORITHM_C
+ {
+ get
+ {
+ return ResourceManager.GetString("IDS_ST_BODY_SIGNATURE_ALGORITHM_C", resourceCulture);
+ }
+ }
+ }
+}
--- /dev/null
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SettingCertificates.res.locale {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SettingCertificates.res.locale.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Owner.
+ /// </summary>
+ internal static string IDS_SCP_BODY_OWNER_ABB {
+ get {
+ return ResourceManager.GetString("IDS_SCP_BODY_OWNER_ABB", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Certificate details.
+ /// </summary>
+ internal static string IDS_ST_BODY_CERTIFICATE_DETAILS {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_CERTIFICATE_DETAILS", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Certificate information.
+ /// </summary>
+ internal static string IDS_ST_BODY_CERTIFICATE_INFORMATION {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_CERTIFICATE_INFORMATION", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Certification authority:.
+ /// </summary>
+ internal static string IDS_ST_BODY_CERTIFICATION_AUTHORITY_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_CERTIFICATION_AUTHORITY_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Common name:.
+ /// </summary>
+ internal static string IDS_ST_BODY_COMMON_NAME_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_COMMON_NAME_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to False.
+ /// </summary>
+ internal static string IDS_ST_BODY_FALSE {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_FALSE", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Issuer:.
+ /// </summary>
+ internal static string IDS_ST_BODY_ISSUER {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_ISSUER", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Issuer:.
+ /// </summary>
+ internal static string IDS_ST_BODY_ISSUER_COLON {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_ISSUER_COLON", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Key usage:.
+ /// </summary>
+ internal static string IDS_ST_BODY_KEY_USAGE_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_KEY_USAGE_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Organisation:.
+ /// </summary>
+ internal static string IDS_ST_BODY_ORGANISATION_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_ORGANISATION_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Public key:.
+ /// </summary>
+ internal static string IDS_ST_BODY_PUBLIC_KEY_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_PUBLIC_KEY_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Serial number:.
+ /// </summary>
+ internal static string IDS_ST_BODY_SERIAL_NUMBER_COLON {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_SERIAL_NUMBER_COLON", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Signature algorithm:.
+ /// </summary>
+ internal static string IDS_ST_BODY_SIGNATURE_ALGORITHM_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_SIGNATURE_ALGORITHM_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to True.
+ /// </summary>
+ internal static string IDS_ST_BODY_TRUE {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_TRUE", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Trusted root CA certificates.
+ /// </summary>
+ internal static string IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to User certificates.
+ /// </summary>
+ internal static string IDS_ST_BODY_USER_CERTIFICATES {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_USER_CERTIFICATES", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Valid from:.
+ /// </summary>
+ internal static string IDS_ST_BODY_VALID_FROM_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_VALID_FROM_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Valid to:.
+ /// </summary>
+ internal static string IDS_ST_BODY_VALID_TO_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_VALID_TO_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Version:.
+ /// </summary>
+ internal static string IDS_ST_BODY_VERSION_C {
+ get {
+ return ResourceManager.GetString("IDS_ST_BODY_VERSION_C", resourceCulture);
+ }
+ }
+
+ /// <summary>
+ /// Looks up a localized string similar to Manage certificates.
+ /// </summary>
+ internal static string IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB {
+ get {
+ return ResourceManager.GetString("IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB", resourceCulture);
+ }
+ }
+ }
+}
--- /dev/null
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SettingCertificates.res.locale {
+ using System;
+
+
+ /// <summary>
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ /// </summary>
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resource1 {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resource1() {
+ }
+
+ /// <summary>
+ /// Returns the cached ResourceManager instance used by this class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SettingCertificates.res.locale.Resource1", typeof(Resource1).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ /// <summary>
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ /// </summary>
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_SCP_BODY_OWNER_ABB" xml:space="preserve">
+ <value>Owner</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_DETAILS" xml:space="preserve">
+ <value>Certificate details</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_INFORMATION" xml:space="preserve">
+ <value>Certificate information</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATION_AUTHORITY_C" xml:space="preserve">
+ <value>Certification authority:</value>
+ </data>
+ <data name="IDS_ST_BODY_COMMON_NAME_C" xml:space="preserve">
+ <value>Common name:</value>
+ </data>
+ <data name="IDS_ST_BODY_FALSE" xml:space="preserve">
+ <value>False</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER" xml:space="preserve">
+ <value>Issuer:</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER_COLON" xml:space="preserve">
+ <value>Issuer:</value>
+ </data>
+ <data name="IDS_ST_BODY_KEY_USAGE_C" xml:space="preserve">
+ <value>Key usage:</value>
+ </data>
+ <data name="IDS_ST_BODY_ORGANISATION_C" xml:space="preserve">
+ <value>Organisation:</value>
+ </data>
+ <data name="IDS_ST_BODY_PUBLIC_KEY_C" xml:space="preserve">
+ <value>Public key:</value>
+ </data>
+ <data name="IDS_ST_BODY_SERIAL_NUMBER_COLON" xml:space="preserve">
+ <value>Serial number:</value>
+ </data>
+ <data name="IDS_ST_BODY_SIGNATURE_ALGORITHM_C" xml:space="preserve">
+ <value>Signature algorithm:</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUE" xml:space="preserve">
+ <value>True</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB" xml:space="preserve">
+ <value>Trusted root CA certificates</value>
+ </data>
+ <data name="IDS_ST_BODY_USER_CERTIFICATES" xml:space="preserve">
+ <value>User certificates</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_FROM_C" xml:space="preserve">
+ <value>Valid from:</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_TO_C" xml:space="preserve">
+ <value>Valid to:</value>
+ </data>
+ <data name="IDS_ST_BODY_VERSION_C" xml:space="preserve">
+ <value>Version:</value>
+ </data>
+ <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
+ <value>Manage certificates</value>
+ </data>
+</root>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_SCP_BODY_OWNER_ABB" xml:space="preserve">
+ <value>소유자</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_DETAILS" xml:space="preserve">
+ <value>인증서 상세정보</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_INFORMATION" xml:space="preserve">
+ <value>인증서 정보</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATION_AUTHORITY_C" xml:space="preserve">
+ <value>인증 기관:</value>
+ </data>
+ <data name="IDS_ST_BODY_COMMON_NAME_C" xml:space="preserve">
+ <value>일반 이름:</value>
+ </data>
+ <data name="IDS_ST_BODY_FALSE" xml:space="preserve">
+ <value>거짓</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER" xml:space="preserve">
+ <value>발급자:</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER_COLON" xml:space="preserve">
+ <value>발급자:</value>
+ </data>
+ <data name="IDS_ST_BODY_KEY_USAGE_C" xml:space="preserve">
+ <value>키 용도:</value>
+ </data>
+ <data name="IDS_ST_BODY_ORGANISATION_C" xml:space="preserve">
+ <value>기관:</value>
+ </data>
+ <data name="IDS_ST_BODY_PUBLIC_KEY_C" xml:space="preserve">
+ <value>공개키:</value>
+ </data>
+ <data name="IDS_ST_BODY_SERIAL_NUMBER_COLON" xml:space="preserve">
+ <value>시리얼 번호:</value>
+ </data>
+ <data name="IDS_ST_BODY_SIGNATURE_ALGORITHM_C" xml:space="preserve">
+ <value>서명 알고리즘:</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUE" xml:space="preserve">
+ <value>진실</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB" xml:space="preserve">
+ <value>신뢰할 수 있는 루트 CA 인증서</value>
+ </data>
+ <data name="IDS_ST_BODY_USER_CERTIFICATES" xml:space="preserve">
+ <value>사용자 인증서</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_FROM_C" xml:space="preserve">
+ <value>유효기간 시작일:</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_TO_C" xml:space="preserve">
+ <value>유효기간 만료일:</value>
+ </data>
+ <data name="IDS_ST_BODY_VERSION_C" xml:space="preserve">
+ <value>버전:</value>
+ </data>
+ <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
+ <value>인증서 관리</value>
+ </data>
+</root>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_SCP_BODY_OWNER_ABB" xml:space="preserve">
+ <value>Właściciel</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_DETAILS" xml:space="preserve">
+ <value>Szczegóły certyfikatu</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_INFORMATION" xml:space="preserve">
+ <value>Informacje o certyfikacie</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATION_AUTHORITY_C" xml:space="preserve">
+ <value>Urząd certyfikacji:</value>
+ </data>
+ <data name="IDS_ST_BODY_COMMON_NAME_C" xml:space="preserve">
+ <value>Używana nazwa:</value>
+ </data>
+ <data name="IDS_ST_BODY_FALSE" xml:space="preserve">
+ <value>Fałsz</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER" xml:space="preserve">
+ <value>Wystawca:</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER_COLON" xml:space="preserve">
+ <value>Wystawca:</value>
+ </data>
+ <data name="IDS_ST_BODY_KEY_USAGE_C" xml:space="preserve">
+ <value>Wykorzystanie klucza:</value>
+ </data>
+ <data name="IDS_ST_BODY_ORGANISATION_C" xml:space="preserve">
+ <value>Organizacja:</value>
+ </data>
+ <data name="IDS_ST_BODY_PUBLIC_KEY_C" xml:space="preserve">
+ <value>Klucz publiczny:</value>
+ </data>
+ <data name="IDS_ST_BODY_SERIAL_NUMBER_COLON" xml:space="preserve">
+ <value>Numer seryjny:</value>
+ </data>
+ <data name="IDS_ST_BODY_SIGNATURE_ALGORITHM_C" xml:space="preserve">
+ <value>Algorytm podpisywania:</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUE" xml:space="preserve">
+ <value>Prawda</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB" xml:space="preserve">
+ <value>Certyfikaty CA zauf. gł. urzędu</value>
+ </data>
+ <data name="IDS_ST_BODY_USER_CERTIFICATES" xml:space="preserve">
+ <value>Certyfikaty użytkownika</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_FROM_C" xml:space="preserve">
+ <value>Ważny od:</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_TO_C" xml:space="preserve">
+ <value>Ważny do:</value>
+ </data>
+ <data name="IDS_ST_BODY_VERSION_C" xml:space="preserve">
+ <value>Wersja:</value>
+ </data>
+ <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
+ <value>Zarządzanie certyfikatami</value>
+ </data>
+</root>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <data name="IDS_SCP_BODY_OWNER_ABB" xml:space="preserve">
+ <value>Owner</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_DETAILS" xml:space="preserve">
+ <value>Certificate details</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATE_INFORMATION" xml:space="preserve">
+ <value>Certificate information</value>
+ </data>
+ <data name="IDS_ST_BODY_CERTIFICATION_AUTHORITY_C" xml:space="preserve">
+ <value>Certification authority:</value>
+ </data>
+ <data name="IDS_ST_BODY_COMMON_NAME_C" xml:space="preserve">
+ <value>Common name:</value>
+ </data>
+ <data name="IDS_ST_BODY_FALSE" xml:space="preserve">
+ <value>False</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER" xml:space="preserve">
+ <value>Issuer:</value>
+ </data>
+ <data name="IDS_ST_BODY_ISSUER_COLON" xml:space="preserve">
+ <value>Issuer:</value>
+ </data>
+ <data name="IDS_ST_BODY_KEY_USAGE_C" xml:space="preserve">
+ <value>Key usage:</value>
+ </data>
+ <data name="IDS_ST_BODY_ORGANISATION_C" xml:space="preserve">
+ <value>Organisation:</value>
+ </data>
+ <data name="IDS_ST_BODY_PUBLIC_KEY_C" xml:space="preserve">
+ <value>Public key:</value>
+ </data>
+ <data name="IDS_ST_BODY_SERIAL_NUMBER_COLON" xml:space="preserve">
+ <value>Serial number:</value>
+ </data>
+ <data name="IDS_ST_BODY_SIGNATURE_ALGORITHM_C" xml:space="preserve">
+ <value>Signature algorithm:</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUE" xml:space="preserve">
+ <value>True</value>
+ </data>
+ <data name="IDS_ST_BODY_TRUSTED_ROOT_CA_CERTIFICATES_ABB" xml:space="preserve">
+ <value>Trusted root CA certificates</value>
+ </data>
+ <data name="IDS_ST_BODY_USER_CERTIFICATES" xml:space="preserve">
+ <value>User certificates</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_FROM_C" xml:space="preserve">
+ <value>Valid from:</value>
+ </data>
+ <data name="IDS_ST_BODY_VALID_TO_C" xml:space="preserve">
+ <value>Valid to:</value>
+ </data>
+ <data name="IDS_ST_BODY_VERSION_C" xml:space="preserve">
+ <value>Version:</value>
+ </data>
+ <data name="IDS_ST_HEADER_MANAGE_CERTIFICATES_ABB" xml:space="preserve">
+ <value>Manage certificates</value>
+ </data>
+</root>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
-<manifest package="org.tizen.setting-certificates" version="1.0.0" api-version="6.5" xmlns="http://tizen.org/ns/packages">
+<manifest xmlns="http://tizen.org/ns/packages" api-version="7.0" package="org.tizen.cssetting-certificates" version="1.0.0">
<profile name="common" />
- <widget-application appid="org.tizen.setting-certificates"
- exec="SettingCertificates.dll"
- type="dotnet"
- multiple="false"
- nodisplay="false"
- taskmanage="true"
- launch_mode="single"
- api-version="9">
+ <widget-application appid="org.tizen.cssetting-certificates"
+ exec="SettingCertificates.dll"
+ type="dotnet"
+ multiple="false"
+ taskmanage="true"
+ nodisplay="true"
+ launch_mode="single"
+ >
<label>SettingCertificates</label>
<icon>SettingCertificates.png</icon>
+ <widget-class classid="certificates" update-period="0">
+ <support-size preview="SettingCertificates.png">4x4</support-size>
+ </widget-class>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
- <splash-screens />
</widget-application>
- <shortcut-list />
- <dependencies />
<privileges>
<privilege>http://tizen.org/privilege/systemsettings.admin</privilege>
+ <privilege>http://tizen.org/privilege/appmanager.launch</privilege>
</privileges>
- <provides-appdefined-privileges />
</manifest>
-using System;
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+using System;
using Tizen.NUI;
-using Tizen.NUI.BaseComponents;
using Tizen.Applications;
namespace SettingView
{
public class Program : NUIApplication
{
+
+ WidgetView mWidgetView;
public Program(string styleSheet, Size2D windowSize, Position2D windowPosition, IBorderInterface borderInterface)
: base(styleSheet, windowSize, windowPosition, borderInterface)
{
Tizen.Log.Error("SettingWidget", "REQUEST \n");
- mWidgetView = WidgetViewManager.Instance.AddWidget("certificates@org.tizen.setting-certificates", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);
+ mWidgetView = WidgetViewManager.Instance.AddWidget("certificates@org.tizen.cssetting-certificates", encodedBundle, window.Size.Width, window.Size.Height, 0.0f);
mWidgetView.Position = new Position(0, 0);
window.GetDefaultLayer().Add(mWidgetView);
}
app.Run(args);
}
-
- WidgetView mWidgetView;
}
}
-using System;
+/*
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
-using Tizen.NUI.Components;
-
-using System.Collections.Generic;
-using System.Text;
namespace SettingView
{
<?xml version="1.0" encoding="utf-8"?>
-<manifest package="org.tizen.SettingView" version="1.0.0" api-version="6.5" xmlns="http://tizen.org/ns/packages">
+<manifest package="org.tizen.SettingView" version="1.0.0" api-version="7.0" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="org.tizen.SettingView" exec="SettingView.dll" multiple="false" nodisplay="false" taskmanage="true" api-version="9" type="dotnet" launch_mode="single">
<label>SettingView</label>
%description
NUI application for displaying certificates installed on device.
-%define tpk_pkgid org.tizen.setting-certificates
+%define tpk_pkgid org.tizen.cssetting-certificates
%define preload_tpk_path /usr/apps/.preload-tpk
%prep
# Uncomment following lines to test tpk installation
#pkgcmd -it tpk -p %{preload_tpk_path}/%{tpk_pkgid}-%{version}.tpk
-cyad -s -k MANIFESTS_GLOBAL -c User::Pkg::%{tpk_pkgid} -u 5001 -p http://tizen.org/privilege/notexist -t ALLOW
-
# Uncomment following lines to test preload tpk installation on image creation
#pkg_initdb --ro
#install_preload_pkg