the digital signature in the assembly - .net-assembly

I read a lot of articles about strong name, then I want to know
where is the digital signature in the assembly?
in the manifest or in the metadata?
thank you advanced.

The public key is inserted inside the assemblyDef table of the manifest while the digital signature is inserted into a special part of the CLR header.
from the book "Practical .NET2 and C#2"

Related

Manipulate the contents of a CSR file before signing

Long story short :
we run our own CA, we have a bunch of policies there, in some of them we DEMAND that the CSR has a SAN field
"customers" often are unable to generate a proper CSR that contains such extension, due to old tools, etc.
the product that we use can actually add/change the SAN field(s) just before the signing step (in the GUI, unfortunately not scriptable.....)
Question - how can i modify the CSR so that i add the SAN field (without having the private key, i ONLY have the CSR file) - from the command line, any command line, bash, powershell, whatever, or any language, python, java, etc. ?
It has to be doable, since it is doable through a GUI (commercial product so its difficult....).
From what i understand the CSR itself consists of "attributes" and public key part so i need to "detach" them, manipulate the "attributes" the way i want to and then put them back together to a valid CSR that can actually be signed.
What have i tried - play around openssl, but in the latest version it breaks the final CSR so that the -verify returns garbage and i dont want to sign that even if i could.
Any ideas are welcome !
Thanks !
BKH

DocuSign rasterization of PDF files of poor quality?

The text on the left is from the originating PDF file, the text on the right is overlayed dynamic data passed into the tab.
The original PDF looks rasterized (likely) is there a way to optimize rasterization to avoid this? I don't see any parameters/mention in the API docs.
I'm a HelloSign API support engineer and happy to help!
When you create the signature request, we do some processing of the document on our servers then present this doc to the signer, and when they've signed we also do some final overlay work with their signature. Unfortunately there's no optimization you can do, we just recommend using PDFs over any other file type as those come out best.

Signing a hash using MSVC++

My program which is written in MSVC++ need to sign a hash. I've found an example from msdn
Can any one please tell how can i use my custom private key to sign the hash. In the example i could not see it accepting a user defined key/text.
Also, please tell me if it is good to store a public key in a text file.
Thank you,
John
Within the Example C Program: Encrypting a File session key derived from a password is used to encrypt data. Of course you have to know the password otherwise you can not be sure who decrypted (or signed in your case).
It's mandatory to make the public part of the key available to everyone otherwise verifying the signature is not possible to someone else. A text file is also ok.

SharePoint files MD5 hash

We have a client who requires that all image files within SharePoint are stored in a manner that it can be shown they are a bit for bit copy of the originally uploaded file. Obviously, hashing the file would be able to show that when the file is retrieved.
What I haven't been able to find it any reference to someone implementing this functionality on a SharePoint image library. I've found numerous articles around implementing this generically in C#, but ideally I'd like to be able to do it on a standard SharePoint document/image library.
Does anyone have any suggestions as how best to go about doing this? Workflow comes to mind, but what do people think? Also, as a side to this, does anyone know whether or not SharePoint will store a bit for bit copy that will verify when we compare the checksum?
You can to implement a event handler which compute your file hash on upload and to store it in a metadata text field. It's a simple solution for your problem.
Why not use a Record Center site, they are designed for this sort of thing - verifiable archiving and storage.
I would add a "text" column to the image library and then implement the hashing logic in an event receiver. You will need two handlers - ItemAdded and ItemUpdated.
The code will look something like
public override void ItemAdded(Microsoft.SharePoint.SPItemEventProperties properties)
{
base.ItemAdded(properties);
this.DisableEventFiring();
properties.ListItem["myCustomField"] = this.CalculateHash(properties.ListItem.File);
properties.ListItem.SystemUpdate();
this.EnableEventFiring();
}

Is there a way to tell if a unicode character is a control, alpha, numeric or symbolic?

Assuming all you have is the binary data and no pre-canned functions, is there a pattern or algorithm to categorize the type of character?
You ask an API to tell you. In Java, you use the Character class. In C++, you can use ICU. If your language doesn't have this, you download the properties database from unicode.org and incorporate it.
In other words, there is no pattern or algorithm. There are tables published by the Unicode consortium that contain the information.
No, there's no pattern. You will need to create some look-up-tables. (Well, I suppose you could do it with a maze of if​s but it wouldn't be nice.)
Luckily in most environments there is a pre-canned API function to do it for you, because building the character class data tables is super-boring.
I have recently publishmy FOSS Unicode Converter and I'm using from Latest Unicode Character Database (Annex #44 - that contain Unicode 5.2)
in this (XML) database youcan search for your requested Character (Hex Code) and see if it is numeric or whatever you want.
you can test this atmy project and if it was usefull you can use its database
http://unicode.codeplex.com is the main repository for the project. you can just see the code or get the executable there

Resources