Search Results

Search found 1746 results on 70 pages for 'bom signature'.

Page 2/70 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Outlook Signature Broken in Entourage

    - by Eric J.
    Some of our company uses Windows with Outlook 2010, and the rest use Mac with Entourage. When our standard signature line is included in an email that goes to Entourage, the result does not display correctly. It appears that Entourage is mangling the HTML. My working theory is that Entourage encounters inline CSS styles it does not know about and stops processing styles, but I'm really not sure. Question: How can I enter a signature into Outlook 2010 that will render correctly in Entourage? For example, can I specify somehow the exact HTML to use? Here's an example of how the HTML is being changed. Original on Outlook, as received by another Outlook client: <span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif"; color:#1785C5'>My Company<br> </span></b><span class=apple-style-span><span style='font-size:9.0pt; font-family:"Century Gothic","sans-serif";color:#666666'>123 Main St.</span></span><span class=apple-style-span><span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif"; color:#AFAFAF'>&nbsp;</span></span><span class=apple-style-span><span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif";color:#666666'>Suite 100</span></span> Note the use of spans, color #1785C5 and color #666666. Same original email, as displayed in an Entourage client: <span style='font-size:9.0pt;font-family:"Century Gothic","sans-serif"; mso-fareast-font-family:"Times New Roman"'><br> <span style='color:#656565'>My Company<br> 123 Main St Suite 100<br> </span> Note the use of br tags rather than spans, and the color #656565.

    Read the article

  • Problems when pasting Outlook 2010 signature logo into message body

    - by Austin ''Danger'' Powers
    Whenever I paste my company logo into a message in Outlook 2010, I run into a variety of complications and anomalies. The dimensions of my original logo image are 315x174 (source image is a PNG file). I am scaling this image down in Photoshop CS6 to a variety of smaller sizes for testing my Outlook signature (300x166, 250x138, 200x110,150x83 and 100x55 pixels). 300x166 = no distortion. This looks the same as in Photoshop (but far too large to use in my signature). 250x130 = distorted (gets stretched much wider by Outlook when pasting into message body). 200x110 = looks reasonable, but seems to have been scaled to a different size (smaller) by Outlook for no obvious reason. 150x83 = for some reason, this is scaled by Outlook to the exact same size that 200x110 was scaled to. In fact, a large range of similar dimensions are scaled to the exact same image size by Outlook. This is very frustrating. Why is this happening and what can be done to prevent it? 100x55 = when pasting my logo from Photoshop to Outlook with these dimensions all that happens is the cursor jumps forwards about an inch on the screen, leaving a blank space where the image was supposed to go. Any advice would be much appreciated.

    Read the article

  • Custom signature for Gmail mobile

    - by pilcrow
    Is it possible to use a custom signature for Gmail to be used only when accessed over an iPhone or other mobile device? While I don't find the Sent from my [iPhone|mobile device] siglines to be very pretty, they are a convenient way to explain and excuse the brevity and occasional typo in mobile email.

    Read the article

  • Create Text File Without BOM

    - by balexandre
    Hi guys, I tried this aproach without any success the code I'm using: // File name String filename = String.Format("{0:ddMMyyHHmm}", dtFileCreated); String filePath = Path.Combine(Server.MapPath("App_Data"), filename + ".txt"); // Process ProcessPBS pbs = new ProcessPBS(); pbs.CreatePBSInfoFile(pbslist, Convert.ToInt64(filename)); // Save file Encoding utf8WithoutBom = new UTF8Encoding(true); TextWriter tw = new StreamWriter(filePath, false, utf8WithoutBom); foreach (string s in pbs.GeneratedFile.ToArray()) tw.WriteLine(s); tw.Close(); // Push Generated File into Client Response.Clear(); Response.ContentType = "application/vnd.text"; Response.AppendHeader("Content-Disposition", "attachment; filename=" + filename + ".txt"); Response.TransmitFile(filePath); Response.End(); the result: It's writing the BOM no matter what, and special chars (like Æ Ø Å) are not correct :-/ I'm stuck! I can't create a file using UTF-8 as Encoding and 8859-1 as CharSet :-( Anyone can help me find the light in the tunnel? All help is greatly appreciated, thank you!

    Read the article

  • UTF-8 BOM signature in PHP files

    - by skidding
    I was writing some commented PHP classes and I stumbled upon a problem. My name (for the @author tag) ends up with a ? (which is a UTF-8 character, ...and a strange name, I know). Even though I save the file as UTF-8, some friends reported that they see that character totally messed up (È™). This problem goes away by adding the BOM signature. But that thing troubles me a bit, since I don't know that much about it, except from what I saw on Wikipedia and on some other similar questions here on SO. I know that it adds some things at the beginning of the file, and from what I understood it's not that bad, but I'm concerned because the only problematic scenarios I read about involved PHP files. And since I'm writing PHP classes to share them, being 100% compatible is more important than having my name in the comments. But I'm trying to understand the implications, should I use it without worrying? or are there cases when it might cause damage? When? Thanks!

    Read the article

  • Verify Authenticode signature as being from our company for automatic updater

    - by James Johnston
    I am implementing an automatic update feature and need some advice on how to do this securely using best practices. I would like to use the downloaded file's Authenticode signature to verify that it is safe to run (i.e. originates from our company and hasn't been tampered with). My question is very similar to question #2008519. The bottom-line question: what's the best, most secure way to check Authenticode signatures for an automatic update feature? What fields in the certificate should be checked? Requirements being: (1) check signature is valid, (2) check it's my signature, (3) old clients can still update when my certificate expires and I get a new one. Here's some background information / ideas from my research: I believe this could be broken into two steps: Verify that the signature is valid. I believe this should be easy using WinVerifyTrust as outlined in http://msdn.microsoft.com/en-us/library/aa382384(VS.85).aspx - I don't expect problems here. Verify that the signature corresponds to our company, and not another company. This seems to be a more difficult question to answer: One possibility is to check some of the strings in the signature. Could be obtained via code at MS KB article #323809, but this article doesn't make recommendations on what fields should be checked for this type of application (or any other, for that matter). Question #1072540 also illustrates how to get some certificate info, but again doesn't recommend what fields to actually check. My concern is that the strings might not be the best check: what if another person is able to obtain a certificate with the same name, for example? Or if there's a valid reason for us to change the strings in the future? The person at question #2008519 has a very similar requirement. His need for a "TrustedByUs" function is identical to mine. However, he goes about doing the check by comparing public keys. While this would work in the short-term, it seems like it won't work for an automatic update feature. This is because code signing certificates are only valid for 2 - 3 years max. Therefore, in the future, when we buy a new certificate in 2 years, the old clients wouldn't be able to update any more due to the change in public key.

    Read the article

  • How do I delete a signature from an Excel document using Office automation

    - by Guy Marom
    Hello, I have a signed Excel workbook and I want to delete the signature from it. The problem is that when I try to delete the signature there's a prompt for confirming the deletion and I want the process to be fully automatic. Here's a code sample, the prompt appears when the last line executes: Dim source As String = "c:\temp\signed.xlsx" Dim app As New Application() app.Visible = True Dim book As Workbook = app.Workbooks.Open(source, UpdateLinks:=0) app.ShowToolTips = False Dim sig As Microsoft.Office.Core.Signature = book.Signatures.Item(1) sig.Delete() Thanks

    Read the article

  • PHP's openssl_sign generates different signature than SSCrypto's sign

    - by pascalj
    I'm writing an OS X client for a software that is written in PHP. This software uses a simple RPC interface to receive and execute commands. The RPC client has to sign the commands he sends to ensure that no MITM can modify any of them. However, as the server was not accepting the signatures I sent from my OS X client, I started investigating and found out that PHP's openssl_sign function generates a different signature for a given private key/data combination than the Objective-C SSCrypto framework (which is only a wrapper for the openssl lib): SSCrypto *crypto = [[SSCrypto alloc] initWithPrivateKey:self.localPrivKey]; NSData *shaed = [self sha1:@"hello"]; [crypto setClearTextWithData:shaed]; NSData *data = [crypto sign]; generates a signature like CtbkSxvqNZ+mAN... The PHP code openssl_sign("hello", $signature, $privateKey); generates a signature like 6u0d2qjFiMbZ+... (For my certain key, of course. base64 encoded) I'm not quite shure why this is happening and I unsuccessfully experimented with different hash-algorithms. As the PHP documentation states SHA1 is used by default. So why do these two functions generate different signatures and how can I get my Objective-C part to generate a signature that PHPs openssl_verify will accept? Note: I double checked that the keys and the data is correct!

    Read the article

  • How to Embed Image in Outlook Signature?

    - by BlackMael
    Is it possible to create an HTML email signature for Outlook 2003 or above that doesn't reference external images? That is, using those special "cid" reference but embed the image itself in the signature and not on the file system or network. This is for an web application that generates a "standard" email signature based on various input from a user. It has worked fine so far with a single "embedded" image. But a new feature is going to require the possible addition of multiple tiny images. Getting to user to save one email signature template and one image to the user's machine is about the limit of what I'd like to require of the user. But forcing the user to save multiple images seem to be pushing things a little to far in my opinion. So my problem is trying to embed the images into without having to inconvenience the user with multiple downloads first.

    Read the article

  • Handling Digital ID/Signature in Outlook Add-in

    - by CoSteve
    I have a C# Outlook Add-In application (VS2005 and 2003 Outlook) that reads incoming emails and strips out the attachments and the email text body for future processing. Occasionally I'll get an email that contains a digital signature. The application will fail when I try to access the mailitem.body property, throwing the following exception: System.Runtime.InteropServices.COMException (0xAB404001): The operation failed. at Microsoft.Office.Interop.Outlook._MailItem.get_Body() at MyLib.MyApp.OutlookAddin.MailProcessor.ProcessMailItem(MailItem mailItem) I'm pretty sure it is the digital signature causing the problem because if I forward the email back to myself, it will strip off the original sender's digital signature and the add-in application will process the email without any problems. I'm not sure what to do. I need to process the email, so I can't just ignore it. Somehow getting the body of the original email without throwing an exception would be ideal. Or I guess if I can identify that there is a digital signature associated with the email, I could forward the email to myself, but that seems a little messy. Does anyone have any suggestions/fixes? Thanks for any help.

    Read the article

  • need primitive public key signature with out of band key distribution

    - by Mike D
    I pretty much a complete neophyte at this signature business so I don't know if what I'm asking is nonsense or not. Anyway, here goes... I want to send an out of band message (don't worry about how it gets there) to a program I've written on a distant machine. I want the program to have some confidence the message is legit by attaching a digital signature to the message. The message will be small less than 200 characters. It seems a public key based signature is what I want to use. I could embed the public key in the program. I understand that the program would be vulnerable to attack by anyone who modifies it BUT I'm not too worried about that. The consequences are not dire. I've looked through the MSDN and around the web but the prospect of diving in is daunting. I'm writing in straight c++, no NET framework or other fancy stuff. I've had no experience including NET framework stuff and little luck during previous attempts. Can anyone point me at some very basic resources to get me started? I need to know 1)how to generate the public and private keys 2)how to sign the message 3)how to verify the signature Any help much appreciated. TIA, Mike

    Read the article

  • UTF-8 BOM in php response to mootools xmlhttprequest

    - by Jimmy
    Hi, I'm writing my first little AJAX-enabled Joomla component. I'm using mootools. I got a xmlhttprequest to contact my Joomla component, and the component returns a response - just plain text echoed by php, like echo 'Hello World!'; It's all working fine, except wireshark tells me that the response is prepended with \357\273\277\357\273\277 when it gets read by the javascript on the client side. This shows up as a little square before the response in an alert box that the script shows. I don't explicitly set the encoding on the xmlhttprequest; mootools docs say that it defaults to UTF8. What's the right way to handle this? Should I be setting the encoding on the request? Mime type? Should the javascript get rid of it? I'm not planning to have any characters requiring UTF8 in the response, so using plain old ascii would be ok for me too. Thanks

    Read the article

  • Digital signature integration with software written in java

    - by Serkan Kasapbasi
    hi everyone, i'm extremely rookie on this security field, so please forgive if my questions are dumb. i am asked to convert and migrate couple "Lotus Forms" forms to our software that is written in java. One thing in forms that bother me is digital signatures. These forms can be signed by digital signatures, probably generated by "Silanis Approve-it". as i have said before, i dont have much knowledge about this technology. and strangely couldnt find any tutorial or example of integrating digital signature and java. So what are the possibilities here ? how my code read a digital signature, sign a document with this signature? There should be an API or something that is provided by vendors right :)

    Read the article

  • How to verify a digital signature with openssl

    - by Aaron Carlino
    I'm using a thirdparty credit card processing service (Paybox) that, after a successful transaction, redirects back to the website with a signature in the URL as a security measure to prevent people from manipulating data. It's supposed to prove that the request originated from this service. So my success URL looks something like this: /success.php?signature=[HUGE HASH] I have no idea where to start with verifying this signature. This service does provide a public key, and I assume I need to create a private key, but I don't know much beyond that. I'm pretty good with linux, and I know I'll have to run some openssl commands. I'm writing the verification script in PHP, which also has native openssl() functions. If anyone could please push me in the right direction with some pseudo code, or even functional code, I'd be very grateful. Thanks.

    Read the article

  • Can't add email signature in Android

    - by user1680411
    I'm trying to compose and send an email which will include a signature at the bottom of my email content in android. I'm able to send an email but I'm not getting the way that allows me to add my own signature. Do you have any suggestion? here's my code: public void addListener() { final Button button = (Button) findViewById(R.id.button1); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { findViewById = (TextView) findViewById(R.id.t1); Intent i = new Intent(Intent.ACTION_SEND); i.setType("text/plain"); i.putExtra(Intent.EXTRA_EMAIL, new String[] { "[email protected]"}); /*i.putExtra(Intent.EXTRA_CC, new String[] { "[email protected]" });*/ i.putExtra(Intent.EXTRA_SUBJECT, "Android Test"); i.putExtra(Intent.EXTRA_TEXT, "Body"); //i.putExtra(Intent.EXTRA_TEXT, "signature"); try { startActivity(Intent.createChooser(i, "Choose mail app...")); } catch (android.content.ActivityNotFoundException ex) { } } }); }

    Read the article

  • How to manually insert signature in Thunderbird? (impossible?)

    - by Rabarberski
    How can I manually insert a signature in Thunderbird when I am busy composing an email? I don't find the option/action in any of the menus (specifically not under Insert, as I would expect). (Note: I know how to configure Thunderbird to automatically insert a signature when creating a new mail in a certain account. But if you delete the signature (accidentaly or not), how can you reinsert it? Or how can you insert it for an account which isn't configured to automatically insert a signature?)

    Read the article

  • not able to install signature keys

    - by Aman
    Hi , I have to sign an blackberry application so that i can load it to the device but, the signature keys i got from the RIM are installed on the system gets formatted and now i am trying to install the signature keys on another system but the server prompts me for this "Unable to register client'2909103544'because there are no more registration attempts.If you have already registered with this server,then you must contact RIM to register additional user" Can we install these keys to only single computer or now i had to purchase new keys

    Read the article

  • Sharepoint Web Part Digital Signature

    - by pm_2
    I've created a SharePoint WebPart and am trying to upload it to the Web Part Gallery. However, when I do so, I get an error saying that it is missing a Digital Signature. How do I generate a digital signature for the web part?

    Read the article

  • Ability to draw and record a signature as part of a form - iphone

    - by mustic
    Apolgies in advance for any errors.. new to this and am not a developer/programmer.. just have some basic unix experience. I have searched the web and struggled to find a solution to my problem when I stumbled onto this website which maybe suggested that there is a solution to my question. For work i use a windows mobile device because we have to get customers to sign and form after a customer visit. the signature being very important. On the windows device i use the notes application and am able to record details and obtain/record (using draw) a customer signature. the form is then emailed back to HQ. The format being used is a *.pwi I have downloaded and paid for several applications for my iphone which is my preferred device and cant quite find anything that does both. the critical bit here is to be able to take a signature on the phone, save the doc in a format such as .txt, .doc or .pdf where i can control the file name then be able to email back to HQ. Am i asking too much? I hope that makes sense.. Any help would be much appreciated many thanks in advance

    Read the article

  • Typical text encoding+BOM, and EOL behavior on mobile devices

    - by Dan W
    Typical things to worry about when dealing with text are the BOM/signature, encoding, and the end of line (EOL) char/chars. I know that Windows often favours \r\n (CR+LF) and Mac/Linux favours \n (LF), but how about mobile devices such as the iPhone and Android? Do typical apps on those platforms favour one or the other? Also, which text encodings are mobiles most likely to use - UTF-8, iso-8859-1, or even Windows 1252 (or other default codepage) or maybe even UTF-16? And if they use UTF-8/16, are they likely to need (or require not having) a BOM/signature? What is the typical behavior here?

    Read the article

  • How do you get Matlab to write the BOM (byte order markers) for UTF-16 text files?

    - by Richard Povinelli
    I am creating UTF16 text files with Matlab, which I am later reading in using Java. In Matlab, I open a file called fileName and write to it as follows: fid = fopen(fileName, 'w','n','UTF16-LE'); fprintf(fid,"Some stuff."); In Java, I can read the text file using the following code: FileInputStream fileInputStream = new FileInputStream(fileName); Scanner scanner = new Scanner(fileInputStream, "UTF-16LE"); String s = scanner.nextLine(); Here is the hex output: Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 00000000 73 00 6F 00 6D 00 65 00 20 00 73 00 74 00 75 00 66 00 66 00 s.o.m.e. .s.t.u.f.f. The above approach works fine. But, I want to be able to write out the file using UTF16 with a BOM to give me more flexibility so that I don't have to worry about big or little endian. In Matlab, I've coded: fid = fopen(fileName, 'w','n','UTF16'); fprintf(fid,"Some stuff."); In Java, I change the code to: FileInputStream fileInputStream = new FileInputStream(fileName); Scanner scanner = new Scanner(fileInputStream, "UTF-16"); String s = scanner.nextLine(); In this case, the string s is garbled, because Matlab is not writing the BOM. I can get the Java code to work just fine if I add the BOM manually. With the added BOM, the following file works fine. Offset(h) 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10 11 12 13 14 15 00000000 FF FE 73 00 6F 00 6D 00 65 00 20 00 73 00 74 00 75 00 66 00 66 00 ÿþs.o.m.e. .s.t.u.f.f. How can I get Matlab to write out the BOM? I know I could write the BOM out separately, but I'd rather have Matlab do it automatically. Addendum I selected the answer below from Amro because it exactly solves the question I posed. One key discovery for me was the difference between the Unicode Standard and a UTF (Unicode transformation format) (see http://unicode.org/faq/utf_bom.html). The Unicode Standard provides unique identifiers (code points) for characters. UTFs provide mappings of every code point "to a unique byte sequence." Since all but a handful of the characters I am using are in the first 128 code points, I'm going to switch to using UTF-8 as Romeo suggests. UTF-8 is supported by Matlab (The warning shown below won't need to be suppressed.) and Java, and for my application will generate smaller text files. I suppress the Matlab warning Warning: The encoding 'UTF-16LE' is not supported. with warning off MATLAB:iofun:UnsupportedEncoding;

    Read the article

  • Weblogic 10.0: SAMLSignedObject.verify() failed to validate signature value

    - by joshea
    I've been having this problem for a while and it's driving me nuts. I'm trying to create a client (in C# .NET 2.0) that will use SAML 1.1 to sign on to a WebLogic 10.0 server (i.e., a Single Sign-On scenario, using browser/post profile). The client is on a WinXP machine and the WebLogic server is on a RHEL 5 box. I based my client largely on code in the example here: http://www.codeproject.com/KB/aspnet/DotNetSamlPost.aspx (the source has a section for SAML 1.1). I set up WebLogic based on instructions for SAML Destination Site from here:http://www.oracle.com/technology/pub/articles/dev2arch/2006/12/sso-with-saml4.html I created a certificate using makecert that came with VS 2005. makecert -r -pe -n "CN=whatever" -b 01/01/2010 -e 01/01/2011 -sky exchange whatever.cer -sv whatever.pvk pvk2pfx.exe -pvk whatever.pvk -spc whatever.cer -pfx whatever.pfx Then I installed the .pfx to my personal certificate directory, and installed the .cer into the WebLogic SAML Identity Asserter V2. I read on another site that formatting the response to be readable (ie, adding whitespace) to the response after signing would cause this problem, so I tried various combinations of turning on/off .Indent XMLWriterSettings and turning on/off .PreserveWhiteSpace when loading the XML document, and none of it made any difference. I've printed the SignatureValue both before the message is is encoded/sent and after it arrives/gets decoded, and they are the same. So, to be clear: the Response appears to be formed, encoded, sent, and decoded fine (I see the full Response in the WebLogic logs). WebLogic finds the certificate I want it to use, verifies that a key was supplied, gets the signed info, and then fails to validate the signature. Code: public string createResponse(Dictionary<string, string> attributes){ ResponseType response = new ResponseType(); // Create Response response.ResponseID = "_" + Guid.NewGuid().ToString(); response.MajorVersion = "1"; response.MinorVersion = "1"; response.IssueInstant = System.DateTime.UtcNow; response.Recipient = "http://theWLServer/samlacs/acs"; StatusType status = new StatusType(); status.StatusCode = new StatusCodeType(); status.StatusCode.Value = new XmlQualifiedName("Success", "urn:oasis:names:tc:SAML:1.0:protocol"); response.Status = status; // Create Assertion AssertionType assertionType = CreateSaml11Assertion(attributes); response.Assertion = new AssertionType[] {assertionType}; //Serialize XmlSerializerNamespaces ns = new XmlSerializerNamespaces(); ns.Add("samlp", "urn:oasis:names:tc:SAML:1.0:protocol"); ns.Add("saml", "urn:oasis:names:tc:SAML:1.0:assertion"); XmlSerializer responseSerializer = new XmlSerializer(response.GetType()); StringWriter stringWriter = new StringWriter(); XmlWriterSettings settings = new XmlWriterSettings(); settings.OmitXmlDeclaration = true; settings.Indent = false;//I've tried both ways, for the fun of it settings.Encoding = Encoding.UTF8; XmlWriter responseWriter = XmlTextWriter.Create(stringWriter, settings); responseSerializer.Serialize(responseWriter, response, ns); responseWriter.Close(); string samlString = stringWriter.ToString(); stringWriter.Close(); // Sign the document XmlDocument doc = new XmlDocument(); doc.PreserveWhiteSpace = true; //also tried this both ways to no avail doc.LoadXml(samlString); X509Certificate2 cert = null; X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly); X509Certificate2Collection coll = store.Certificates.Find(X509FindType.FindBySubjectDistinguishedName, "distName", true); if (coll.Count < 1) { throw new ArgumentException("Unable to locate certificate"); } cert = coll[0]; store.Close(); //this special SignDoc just overrides a function in SignedXml so //it knows to look for ResponseID rather than ID XmlElement signature = SamlHelper.SignDoc( doc, cert, "ResponseID", response.ResponseID); doc.DocumentElement.InsertBefore(signature, doc.DocumentElement.ChildNodes[0]); // Base64Encode and URL Encode byte[] base64EncodedBytes = Encoding.UTF8.GetBytes(doc.OuterXml); string returnValue = System.Convert.ToBase64String( base64EncodedBytes); return returnValue; } private AssertionType CreateSaml11Assertion(Dictionary<string, string> attributes){ AssertionType assertion = new AssertionType(); assertion.AssertionID = "_" + Guid.NewGuid().ToString(); assertion.Issuer = "madeUpValue"; assertion.MajorVersion = "1"; assertion.MinorVersion = "1"; assertion.IssueInstant = System.DateTime.UtcNow; //Not before, not after conditions ConditionsType conditions = new ConditionsType(); conditions.NotBefore = DateTime.UtcNow; conditions.NotBeforeSpecified = true; conditions.NotOnOrAfter = DateTime.UtcNow.AddMinutes(10); conditions.NotOnOrAfterSpecified = true; //Name Identifier to be used in Saml Subject NameIdentifierType nameIdentifier = new NameIdentifierType(); nameIdentifier.NameQualifier = domain.Trim(); nameIdentifier.Value = subject.Trim(); SubjectConfirmationType subjectConfirmation = new SubjectConfirmationType(); subjectConfirmation.ConfirmationMethod = new string[] { "urn:oasis:names:tc:SAML:1.0:cm:bearer" }; // // Create some SAML subject. SubjectType samlSubject = new SubjectType(); AttributeStatementType attrStatement = new AttributeStatementType(); AuthenticationStatementType authStatement = new AuthenticationStatementType(); authStatement.AuthenticationMethod = "urn:oasis:names:tc:SAML:1.0:am:password"; authStatement.AuthenticationInstant = System.DateTime.UtcNow; samlSubject.Items = new object[] { nameIdentifier, subjectConfirmation}; attrStatement.Subject = samlSubject; authStatement.Subject = samlSubject; IPHostEntry ipEntry = Dns.GetHostEntry(System.Environment.MachineName); SubjectLocalityType subjectLocality = new SubjectLocalityType(); subjectLocality.IPAddress = ipEntry.AddressList[0].ToString(); authStatement.SubjectLocality = subjectLocality; attrStatement.Attribute = new AttributeType[attributes.Count]; int i=0; // Create SAML attributes. foreach (KeyValuePair<string, string> attribute in attributes) { AttributeType attr = new AttributeType(); attr.AttributeName = attribute.Key; attr.AttributeNamespace= domain; attr.AttributeValue = new object[] {attribute.Value}; attrStatement.Attribute[i] = attr; i++; } assertion.Conditions = conditions; assertion.Items = new StatementAbstractType[] {authStatement, attrStatement}; return assertion; } private static XmlElement SignDoc(XmlDocument doc, X509Certificate2 cert2, string referenceId, string referenceValue) { // Use our own implementation of SignedXml SamlSignedXml sig = new SamlSignedXml(doc, referenceId); // Add the key to the SignedXml xmlDocument. sig.SigningKey = cert2.PrivateKey; // Create a reference to be signed. Reference reference = new Reference(); reference.Uri= String.Empty; reference.Uri = "#" + referenceValue; // Add an enveloped transformation to the reference. XmlDsigEnvelopedSignatureTransform env = new XmlDsigEnvelopedSignatureTransform(); reference.AddTransform(env); // Add the reference to the SignedXml object. sig.AddReference(reference); // Add an RSAKeyValue KeyInfo (optional; helps recipient find key to validate). KeyInfo keyInfo = new KeyInfo(); keyInfo.AddClause(new KeyInfoX509Data(cert2)); sig.KeyInfo = keyInfo; // Compute the signature. sig.ComputeSignature(); // Get the XML representation of the signature and save // it to an XmlElement object. XmlElement xmlDigitalSignature = sig.GetXml(); return xmlDigitalSignature; } To open the page in my client app, string postData = String.Format("SAMLResponse={0}&APID=ap_00001&TARGET={1}", System.Web.HttpUtility.UrlEncode(builder.buildResponse("http://theWLServer/samlacs/acs",attributes)), "http://desiredURL"); webBrowser.Navigate("http://theWLServer/samlacs/acs", "_self", Encoding.UTF8.GetBytes(postData), "Content-Type: application/x-www-form-urlencoded");

    Read the article

  • How to verify a signature using M2Crypto 0.16

    - by Daniel Mccain
    After some goggling I found some usual answers for this question, like: http://stackoverflow.com/questions/595114/how-to-load-an-rsa-key-from-a-pem-file-and-use-it-in-python-crypto some code: x509 = X509.load_cert_string(certificate) pubkey = x509.get_pubkey() pubkey.reset_context(md=sha1) pubkey.verify_init() pubkey.verify_update(content) decoded_signature = signature.decode('base64') if pubkey.verify_final(decoded_signature)==0: print 'error' sys.exit(1) and the code presented above works fine in M2Crypto 0.20. But I need to do exactly the same think using the M2Crypto 0.16 (the official package in RHEL5), and I have problems using the pubkey.verify_final method because in this particular version the signature parameter doesn't exist. So how can I do it? using the M2Crypto 0.16 Thanks.

    Read the article

  • Twisted Spread: How to authenticate each RPC with digital signature

    - by kronat
    I have remote objects which talk each others with RPCs, using Twisted Spread. I want that objects authenticate messages, before using them, with digital signatures, but I don't know where to start to implement this. In my head, the Root object must have a public/private key pair, and the Client too. When a message is sent, a digital signature of the hash is added, and when it is received, the signature is checked. Is the Protocol part where I need to add these adds and checks? Thank you

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >