?
Solved

Using Windows Certificates with VBA

Posted on 2009-12-29
8
Medium Priority
?
1,500 Views
Last Modified: 2013-11-28
Experts,
I'm trying to read certificates in Windows with VBA, I was wondering how to go about this. Everytime I search the internet for this, it throughs me into "how to digitally sign an access database". Here are the specifics the certificates are published to windows, I would like to just use the ones that are published not read off of a smart card(DOD Common Access Card). Any help is apprecaited
0
Comment
Question by:DanaGarcia
  • 4
  • 3
8 Comments
 
LVL 85
ID: 26138132
What do you mean by "read a certificate"? A Digital Certificate is used to verify that a specific environment (code base, machine, etc) is valid and unchanged since the certificate was applied.

What exactly are you trying to accomplish?
0
 
LVL 59

Expert Comment

by:Chris Bottomley
ID: 26138211
Hello DanaGarcia,

PLace the database in a trusted area or add the folder to the trusted locations.  Alternatively you can self certificate the database but with 2007 I find trusting  a location and placing the files in that location works very well.

See http://office.microsoft.com/en-us/powerpoint/HA100310711033.aspx#4 for some general info.

Regards,

chris_bottomley
0
 
LVL 4

Author Comment

by:DanaGarcia
ID: 26138240
LSMConsulting,
We all have a CAC(Common Access Card) that is issued to us for computer access among other things, Everyone has a digital signature on their card, I need to access that signature in vba to add it into the database to show who it came from.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 85
ID: 26138278
I believe you've asked something similar before. VBA would really have no mechanism to interact with that card, but the vendor of that card may have published an API/SDK which would allow your VBA code to read and verify that signature.

Is this not something that an Windows environment variable would tell you? What is your overall purpose of this? Do you simply want to "stamp" a record when a user edits, or something along those lines?
0
 
LVL 4

Author Comment

by:DanaGarcia
ID: 26138340
Exactly and thats what i'm asking is if you guys know what the environment variable is? P.S. I have never asked anything about a card or certificates.
0
 
LVL 85

Accepted Solution

by:
Scott McDaniel (Microsoft Access MVP - EE MVE ) earned 2000 total points
ID: 26138382
I'm not sure ... this would depend on many different things. There are plenty of variables available (like the UserName, for example), but I'm not sure how those interact with your smartcard. Can you drop to the Command line (i.e. click Run, then enter "cmd")? If so, enter this:

set

and press the Enter key ... you'll see all the environment variables listed. You can refer to them in VBA like this:

Environ("TheNameOfTheVariable")

so on my machine, this:

Environ("UserName")

Returns "Scott"

I'm not sure, however, that your smartcard will reset these variables when a user "logs in" ... this may be the case however ...



0
 
LVL 4

Author Comment

by:DanaGarcia
ID: 26138471
Yeah I know about the Environ("USERNAME") part, I did what you said as far as typing in set and there is no smartcard variable or any certificate variable. I guess USERNAME Environment Variable is as close as i'll get to actually signing.
0
 
LVL 4

Author Closing Comment

by:DanaGarcia
ID: 31670776
Thanks for your time, You did a good job but I'm still left with questions. Have a good day, and a happy New Year
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
Beware when using the ListIndex and the Column() properties of a listbox in Access 2007.  A bug has been identified in the Access 2007 listbox code which can cause the .ListIndex property to return a -1, and the .Columns(#) property to return a NULL…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question