List Certs in Truststore programmatically
Hi,
I need to iterate the Certificates in my App Server (Websphere)'s trust store (trust.jks) programmatically. I need to look at each cert, tell if it is within a month of expiring (and send a warning email if it is). We just got burned by an expired SSL certificate and my manager is adamant that we get this in place. We are going to hook up an automated SiteScope monitor to hit a simple JSP page that iterates our certs and warns via email about imminent expirations -- that is... if we can? Is this possible? Pretty new to the security APIs -- where would I begin on something like this? Thanks in advance for anyone who can help, or for just taking the time to look at my post,
Jim Bender
[email protected]
See java.security.KeyStore, it has everything you need.
Similar Messages
-
How to Create Custom List in SharePoint 2010 Programmatically ?
Hi,
i have tried the following way,
http://devendra-sharepoint.blogspot.in/2012/01/creating-list-programatically-in_30.html
But i am not able to create list.
Becuase i am getting the following error.
'Microsoft.SharePoint.SPWeb' does not contain a definition for 'EnsureList' and no extension method 'EnsureList' accepting a first argument of type 'Microsoft.SharePoint.SPWeb' could be found (are you missing a using directive or an assembly reference?)
Please advice.
Thanks,
AasaiHi,
You can use list.Fields.Add() to add column in list. See below blog:
http://www.c-sharpcorner.com/blogs/3764/create-sharepoint-list-programmatically.aspx
Use this to delete list:
http://www.c-sharpcorner.com/UploadFile/54db21/delete-list-in-sharepoint-2010-programmatically-using-vs-201/
See this for remove user/group from list:
http://www.c-sharpcorner.com/UploadFile/54db21/remove-group-permission-to-list-in-sharepoint-2010-programma/
Hope it could help
Hemendra: "Yesterday is just a memory,Tomorrow we may never see"
Whenever you see a reply and if you think is helpful, click "Vote As Helpful"! And whenever
you see a reply being an answer to the question of the thread, click "Mark As Answer -
CSOM - Fetching list item version history programmatically
HI,
Is it possible to get the List item version history programmatically using Client Object model?
I have checked these links:
http://www.learningsharepoint.com/2010/07/16/programmatically-get-document-version-history-using-client-object-model-sharepoint-2010/
but was not able to achieve. I am not looking for Document library, but for a custom list.
ThanksHi,
In SharePoint Object Model, there is a
SPListItem.Versions property
can help to “Gets the collection of item version objects that represent the versions of the item”.
However, in SharePoint Client Object Model, this property is not available at this moment.
A workaround is that we can create a custom WCF web service for consuming from client side, then in this web service, we can use Object Model to access the versions of a list
item.
About how to
create and a custom WCF web service:
http://nikpatel.net/2012/02/29/step-by-step-building-custom-wcf-services-hosted-in-sharepoint-part-i/
This workaround would not be applied to SharePoint Online cause Object Model is needed.
If there may be some better ideas or solutions about this topic, your sharing would be welcome.
Thanks
Patrick Liang
Forum Support
Please remember to mark the replies as answers if they
help and unmark them if they provide no help. If you have feedback for TechNet
Subscriber Support, contact [email protected]
Patrick Liang
TechNet Community Support -
Oc4j standalone not seeing client cert in truststore
OC4J standalone 10.1.2 running on W2K server.
I have a web site configured for SSL with needs-client-auth="true".
If the client certificate is in the keystore referenced in the <ssl-config> element, authorization works. If the client cert is instead in the truststore (cacerts), the certificate is not found. The Sun JSSE docs recommend that private keys only be in the keystore, and public keys in the truststore. When the client certs are in the keystore, they are visible to the outside world thru a utility like openssl. This exposes our customer names (the CN on the client cert).
How do I get client certs in a truststore to be recognized?
Thanks, MarshallKeystores and truststores are the same type of file. Each can be accessed through a utility like openssl if one has access to the file system (whuch would list all public certs in them provided that you have the password of course). The Sun JSSE recommends this as a best practice, not as a security vulnerability as far as I know.
-
Hi there,
How to get Managed Metadata Lists ALL Columns and ALL Choice Lists Columns that are used in the Site Collection programmatically please.
RegardsHi sharepointaju,
Managed Metadata list is a hidden list, that you can access it through
http://siteurl/Lists/TaxonomyHiddenList/AllItems.aspx, then it is similar to other lists, you can use server or client code to interate each field in the list, show the the value for each item.
For all choice list columns, I'm not clear what you mean in this situation, do you mean to get all choice columns in the site collection, if so, iterate site columns, and lists to get list fields, check whether it is a choice type field.
This may be not your requirement, please provide more information how you want to get which value.
Thanks,
Qiao Wei
TechNet Community Support -
The list opens when I programmatically assign null to the item
Hi
I'm using Oracle Forms 11g. I have an item associated with a list and with validate with list enabled. If I programmatically assign null to the item the list opens. I've tried to disable list validation before I assign null but it doesn't work.
Regards,
Néstor BoscánI tested it in a Forms 10.1.2.0 sample dialog:
select id, code, name
from
((select null id, 'ALL' code, 'ALL' name from dual)
union
(select empno, ename, job from emp))
order by id nulls firstAnd it works like a charm. The null value is accepted by the EMPNO item, then the LOV is not displayed.
Check if you don't have the LOV validation set to another item in the block...
Francois -
Getting permissions on distribution lists in exchange server programmatically
Hi All,
Is there any way to get the permissions of current user on distribution lists in exchange server?
dineshYou cannot use distribution list to assign permission on sharepoint server.
You can use LDAP protocol to query and get user details from Distribution list and then assign permission. you will have to custom code this
If this helped you resolve your issue, please mark it Answered -
SelectManyShuttle - unable to programmatically populate the selected list.
Hi - I am trying to use the selectManyShuttle and am able to populate the LHS, move items to the RHS of the shuttle and propogate these moved selections to the database. However despite numerous efforts I have been unable to programmatically repopulate the RHS (selected list) of the shuttle programmatically. In desperation I wrote a method that I used to populate the LHS and bound the RHS to the same method as follows.
<af:panelGroupLayout>
<af:selectManyShuttle leadingHeader="All States" trailingHeader="Selected States"
size="20"
value="#{pageFlowScope.backing_wizard_bean.selectedItems}"
binding="#{pageFlowScope.backing_wizard_bean.stateShuttle}"
autoSubmit="true">
<f:selectItems value="#{pageFlowScope.backing_wizard_bean.selectedItems}"/>
</af:selectManyShuttle>
</af:panelGroupLayout>
The method that is bound to the "all list" and the "selected list" is as follows
public List getSelectedItems() {
List<SelectItem> list = new ArrayList<SelectItem>();
SelectItem item1 = new SelectItem();
item1.setLabel("First");
item1.setValue("FirstValue");
list.add(item1);
SelectItem item2 = new SelectItem();
item2.setLabel("Second");
item2.setValue("Second Value");
list.add(item2);
return list;
I am always able to populate the LHS of the shuttle but never the RHS even though I can see that the getSelectedItems method is being invoked correctly.
Doesn't seem as if there is too much that I could be doing wrong but I have been up against this for a while to no avail.
Any help would be great.
Thanks.I am using version JDEVADF_MAIN.D5PRIME_GENERIC_080406.0004.4924
Thanks. -
Attach multiple files to a List Item in SharePoint 2013
Hi Guys,
I have a customer that want to attach multiple files to single list item in a dialog box. like Datasheet View, if we set up a Datasheet View and click on the Attachment cell, it opens a dialog box that allow to select and attach multiple files as one operation.
Does anyone know how to solve this issue?
As we know, if we want to attach multiple files, it only allow me to attach one file at a time, then repeat this process for every other file.
Thanks in advance!
JodieHi,
According to your post, my understanding is that you wanted to upload multiple files in SharePoint list.
There is no out of the box way to accomplish this with SharePoint.
You can refer to the following articles to achieve it programmatically.
Multiple Upload File Programmatically Using GridView:
http://kamilamirul.wordpress.com/2013/01/19/multiple-upload-file-programmatically-using-gridview/
Upload multiple files attached to a SharePoint list item.
http://nestorrg-blogs.itequia.com/2010/01/upload-multiple-files-attached-to.html
Programatically Upload Multiple File in SharePoint List
http://social.technet.microsoft.com/wiki/contents/articles/2990.programatically-upload-multiple-file-in-sharepoint-list-part-2.aspx
Programmatically uploading multiple files to Custom sharepoint list
http://www.c-sharpcorner.com/UploadFile/sarav82/MOSS11072007065009AM/MOSS.aspx
Thanks & Regards,
Jason
Jason Guo
TechNet Community Support -
Custom list templates not deployed
Hi everyone,
Today I came across a wierd issue while creating some lists in SP 2010 programmatically.
I created a few lists schema, list templates and list instances declaratively.
I deployed my package and everything seems to work as expected so far.
I activated my custom feature where (intentionally) I put some C# codes to create a list instance based on one of my deployed list template.
At first, i.e last week, creating this list instance programmatically worked well.
So are those I deployed.
Today, the creation failed because the list template identified by its list-template ID does not exist.
Wierd ! I checked the package, all elements, all list template, all IDs, all 14-hive files, ... everything was OK. No packaging errors found.
Each time I deploy these list templates, they don't even appear in the silverlight-based list-creation popup.
They don't even appear in the "SP Manager" tool.
All my custom lists that was instantiated by SP (using declarative list instance), are well created,
but they don't have their respective custom logo.
And obviously, all its settings (within list template's XML file) was not applied.
It's the first time I met this kind of problem.
I even remove my content database, but the problem remains unchanged.
Does anyone have any idea of what's wrong with my list templates, or even with SP ?
Any idea to fix it ?
Thanks in advance,
Okavango93
PS : In my WSP solution, I associate one list template element to three features, so I cannot set the attribute FeatureId to the list template.Hi,
No answer so far ?
I tore my hair out enough since a week, but finally I find out why.
I fix today my list template issue by setting the feature attribute RequireResouces to false.
If not, all element inside that feature will be hidden from the UI, and so will be the feature ... even if
Hidden attribute equals to false and even if in any SP tools the feature seems to be there.
Hope this help !
Okavango93
More infos about this attribute here : SPFeatureDefinition.RequireResources
Property -
Hello,
I have a mix of server certificates from Verisign and Network Solutions CAs. Both types are stored in my Crypto accelerator (hardware token), from where I've been using them for WS6 and AS7 instances.
In WS7, the Certificates tab in the admin interface shows certs of both types and the token that they are contained within. When I attempt to configure a listener with SSL enabled, the Certificate field has two types, "RSA Certificates" and "ECC Certificates". The latter says "No ECC Certificates Available", and the pick-list for the RSA Certificates only lists the Verisign certificates.
For a server that I migrated from an older version (WS6.1), the server.xml lists the correct server-cert-nickname value for a NetSol cert, and indeed, the cert is properly loaded and the listener starts up fine using that certificate.
Why is it that my NetSol certs don't show up in the admin interface? I can hack the server.xml file in vi to use the correct certs, but I'm thinking there should be a way that I can access these other certs with the admin interface.
Thanks,
BillOutput of wadm list-certs --verbose -all:
nickname issuer-name expiry-date
[email protected]:Server-Cert Network Solutions Certificate Authority May 19, 2007 6:59:59 PMThere is no -h option to certutil -L:
certutil -L [-n cert-name] [-X] [-d certdir] [-P dbprefix] [-r] [-a]However, if I export it from the hardware token using pk12util then import it into the internal token, I can view the details:
# pk12util -o xxx -d . -n [email protected]:Server-Cert
Enter Password or Pin for "NSS Certificate DB":
Enter Password or Pin for "[email protected]":
Enter password for PKCS12 file:
Re-enter password:
pk12util: PKCS12 EXPORT SUCCESSFUL
# pk12util -i xxx -d $PWD
Enter Password or Pin for "NSS Certificate DB":
Enter password for PKCS12 file:
pk12util: PKCS12 IMPORT SUCCESSFUL
# certutil -L -d .
Network Solutions Certificate Authority - GTE Corporation c,,
Server-Cert u,u,u
# certutil -L -d . -n Server-Cert
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
28:f5:87:82:b0:65:ff:58:08:63:b5:0e:69:07:ea:6d
Signature Algorithm: PKCS #1 SHA-1 With RSA Encryption
Issuer: "CN=Network Solutions Certificate Authority,O=Network Solutio
ns L.L.C.,C=US"
Validity:
Not Before: Fri May 19 00:00:00 2006
Not After : Sat May 19 23:59:59 2007
Subject: "CN=*.qisc.com,OU=Secure Link SSL Wildcard,O="Quixote Intern
et Services & Consulting, Inc.",L=Chippewa Falls,ST=Wisconsin,C=U
S"
Subject Public Key Info:
Public Key Algorithm: PKCS #1 RSA Encryption
RSA Public Key:
Modulus:
c4:87:81:66:77:99:c5:8e:f1:59:ff:59:c6:38:63:5a:
46:31:8e:13:38:5e:2e:71:d7:22:38:5b:df:c4:47:e9:
d3:c3:ff:52:3a:5b:21:c1:b5:01:0a:ec:81:3d:80:b4:
39:74:6a:7d:39:63:e1:06:a4:f1:45:cf:43:8d:6a:79:
49:4e:d9:22:d2:8f:08:6e:23:87:e3:14:7f:aa:c7:8f:
df:d7:d0:e1:e0:7e:1c:d7:64:d0:43:94:19:06:7d:48:
82:6f:e3:e1:05:69:cc:42:67:9f:db:e5:c7:6e:11:7a:
10:94:6c:95:f0:1e:5c:36:93:37:09:ea:b4:0d:4e:6f
Exponent: 65537 (0x10001)
(stuff deleted for brevity - let me know if you need to see all of this output)Hmmm...this is interesting...after importing the cert from the hardware token into the internal certificate database, it now shows up as "Server-Cert" in the RSA Certificates list of the SSL->Edit HTTP Listener admin page. So it only shows certs from the hardware token when they are Verisign certs, even though the NetSol certs work just fine when they are stored in the internal database. This is NOT a work-around, however, as this defeats the purpose of having the crypto accelerator.
BTW, I also sent a note to NetSol's support people, and they had this thought:
As we use an intermediate, that could be the reason why they are not listed.
Without the intermediate it will not find a chain to the trusted root.
We would recommend contacting the software provider for details on
importing the intermediate into the application server.I have already tried importing their certificates into the internal token, but that had no effect on this problem. Do I need to import their intermediate certs into the hardware token, rather than the internal one? If so, how do I do that? Or do I need to install these intermediate certs in the admin server's internal database, rather than my server instance's database?
On the assumption that these intermediate certs were needed in the admin server's internal database, I used certutil to load them to see if that would help:
# certutil -A -n 'AddTrust External Root' -t 'CT,C,C' \
-d . -a -i /tmp/certs/AddTrustExternalCARoot.crt
# certutil -A -n 'UTN-USERFirst-Hardware - AddTrust AB' -t 'c,,' \
-d . -a -i /tmp/certs/UTNAddTrustServer_CA.crt
# certutil -A -n 'Network Solutions Certificate Authority - GTE Corporation' -t 'c,,' \
-d . -a -i /tmp/certs/NetworkSolutions_CA.crt
# certutil -L -d .
Admin-Server-Cert u,u,u
Admin-Client-Cert u,u,u
AddTrust External Root CT,C,C
UTN-USERFirst-Hardware - AddTrust AB c,,
Network Solutions Certificate Authority - GTE Corporation c,,
Admin-CA-Cert CTu,u,uHowever, after stopping and restarting the admin server, I still do not see my token-resident certs in the admin interface.
Let me know what you'd like to see next.
Thanks,
Bill -
[Oracle Forms 6i] : conflict properties between datablock and list item
hi
i have a datablock which contains a list item. my list item is filled programmatically.
the user needs to be able to change the values in that list item.
well the problem is that the user can't change the value in my list item when the property INSERT_ALLOWED of the data block is set to false.
i need this property to be set to false, cause it disable the green button up on my form
aparently when this property is set to false, i can't change the value of my list item
help please !
thx
DanI couldn't understand this portion
'i need this property to be set to false, cause it disable the green button up on my form'
Can you explain what exactly you mean by disabling the green button? -
How to add users from person or group field in a sharepoint list to sharepoint group
Hi,
How to add users(single or multiple) from person or group field in a sharepoint list to sharepoint group programmatically?
Any suggestions would be appreciated.
Thank you,
AA.Hello,
Use SPGroup.AddUser() method to add user in group. I have just written sample code in notepad so it is not tested:
SPSecurity.RunWithElevatedPrivileges(delegate()
using(SPSite Site = new SPSite(SPContext.Current.Site.Url))
Using(SPWeb Web = Site.OpenWeb())
SPList list = web.Lists["ListName"];
SPQuery query=new SPQuery ();
query.Query = "<Where><Eq><FieldRef Name='Title' /><Value Type='Text'>Test</Value></Eq></Where>";
SPListItemCollection items = list.GetItems(query);
if(items.Count > 0)
foreach(SPListItem item in items)
//Get USers from person or group column
SPFieldUser userField = (SPFieldUser)item.Fields.GetField("Users");
SPFieldUserValueCollection userFieldValueCollection = (SPFieldUserValueCollection)userField.GetFieldValue(item["Users"].ToString());
SPGroup spGroup = spSite.RootWeb.Groups[groupName];//group name
if (users.Count != 0)
bool isUserInGroup = false;
foreach (SPFieldUserValue user in users)
foreach (SPUser item in spGroup.Users)
string itemUserName = item.LoginName;
string UserName = user.User.LoginName;
if (itemUserName == UserName)
isUserInGroup = true;
break;
if (!isUserInGroup)
spGroup.AddUser(user.User);
The above code will query list item and then get users from "Users" column. Now it will check whetehr user is already in group not, if not then add user in group.
http://rajanijilla.blogspot.sg/2012/09/add-users-to-group-programmatically.html
Hope it could help
Hemendra:Yesterday is just a memory,Tomorrow we may never see
Please remember to mark the replies as answers if they help and unmark them if they provide no help -
Problem when getting from truststore
Hi,
I have a problem that when using SSL and getting trusted cert from truststore. When using System.setProperty("javax.net.debug", "all");, although the cert is not in valid date, I can get see that the cert is added like following when using jdk1.4.2_04 or later
init truststore
adding as trusted cert:
Subject: ...........
However, the exception "javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found" exists when using jdk1.4.2_03, and I can see that after init truststore, no cert is added.
Actually, it does not affect the application, but just want to know that whether jdk1.4.2_03 or before version does not get the expired cert? jdk1.4.2_04 or later will get it?
Thank you.As long as I know you cannot retrieve the pairs key/value in the usual way from a multipart-data form.
This post is about it:
http://forum.java.sun.com/thread.jspa?threadID=258829&messageID=971787 -
Feature that automatically creates a list and columns
Hi,
I wanted to create a feature that automatically creates a list and columns programatically. Can anyone please help me how to implement this.
Regards,
PraveenPlease check below article to create columns and list programatically
http://www.sharepointdoug.com/2012/12/programmatically-creating-content-type.html
similar thread below to create list programatically
https://social.msdn.microsoft.com/Forums/sharepoint/en-US/2d82a8fd-052c-4d24-bfef-3ff59986b29c/how-to-create-custom-list-in-sharepoint-2010-programmatically-?forum=sharepointdevelopmentprevious
My Blog- http://www.sharepoint-journey.com|
If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
Maybe you are looking for
-
Issue in accessing Client Web Service 401 authentication error
Hi, I have a requirement where i need to call a web service from SOA composite. When i deploy the service on SOA Server and try accessing it i get below error **oracle.fabric.common.FabricException: Cannot read WSDL "{http://www.service-now.com}Servi
-
Hey all, I'm fairly new to flash, but I can do a few things, I had a good flash program going in as1, which I'm trying to convert to as3. I had asked on irc for some help, but it was touching on subjects I have not covered on as, and even after looki
-
Hi, I need some documentation on GP process.Please give me if anybody has. with regards Pradeep.B
-
Hi, I would like to know if its possible to use CMIS queries to retrieve content outside a content presenter within a portal. I know there is a REST interface but I am looking to just use CMIS queries to build functionalities like filters, searches,
-
Anyone used Apple's tech support ?
Has anyone used Apples tech support for the iPod ? both hardware and software support ? did you have to do the pay option since it was past 90 days ? was it an ok experience ? I am just trying to decide if it is worth the call and $$ or not