Search Results

Search found 155 results on 7 pages for 'glenn andersson'.

Page 2/7 | < Previous Page | 1 2 3 4 5 6 7  | Next Page >

  • Visual Basic Cryptography Question

    - by Glenn Sullivan
    I am trying to mimic the results of some C code that uses the OpenSSL library using the system.security.crytography library in the .net 3.5 world, and I can't seem to get it right. I need some help... part of the issue is my understanding of crytography in general. Here's what is supposed to happen: I send a request for authentication to a device. It returns a challenge digest, which I then need to sign with a known key and return The device returns a "success" or "Fail" message. I have the following code snippet that I am trying to "copy": //Seed the PRNG //Cheating here - the PRNG will be seeded when we create a key pair //The key pair is discarded only doing this to seed the PRNG. DSA *temp_dsa = DSA_new(); if(!temp_dsa) { printf("Error: The client had an error with the DSA API\n"); exit(0); } unsigned char seed[20] = "Our Super Secret Key"; temp_dsa = DSA_generate_parameters(128, seed, sizeof(seed), NULL, NULL, NULL, NULL); DSA_free(temp_dsa); //A pointer to the private key. p = (unsigned char *)&priv_key; //Create and allocate a DSA structure from the private key. DSA *priv_dsa = NULL; priv_dsa = d2i_DSAPrivateKey(NULL, &p, sizeof(priv_key)); if(!priv_dsa) { printf("Error: The client had an error with the DSA API\n"); exit(0); } //Allocate memory for the to be computed signature. sigret = OPENSSL_malloc(DSA_size(priv_dsa)); //Sign the challenge digest recieved from the ISC. retval = DSA_sign(0, pResp->data, pResp->data_length, sigret, &siglen, priv_dsa); A few more bits of information: priv_key is a 252 element character array of hex characters that is included. The end result is a 512 (or less) array of characters to send back for validation to the device. Rasmus asked to see the key array. Here it is: unsigned char priv_key[] = {0x30, 0x81, 0xf9, 0x02, 0x01, 0x00, 0x02, 0x41, 0x00, 0xfe, 0xca, 0x97, 0x55, 0x1f, 0xc0, 0xb7, 0x1f, 0xad, 0xf0, 0x93, 0xec, 0x4b, 0x31, 0x94, 0x78, 0x86, 0x82, 0x1b, 0xab, 0xc4, 0x9e, 0x5c, 0x40, 0xd9, 0x89, 0x7d, 0xde, 0x43, 0x38, 0x06, 0x4f, 0x1b, 0x2b, 0xef, 0x5c, 0x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, 0x06, 0x8e, 0xc1, 0x41, 0x40, 0xf1, 0xf6, 0xe1, 0xfa, 0xfb, 0x64, 0x28, 0x02, 0x15, 0xce, 0x47, 0xaa, 0xce, 0x6e, 0xfe}; Can anyone help me translate this code to it's VB.net crypto equivalent? TIA, Glenn

    Read the article

  • How do I set the jax-ws client request timeout programatically on jboss?

    - by Jonas Andersson
    I am trying to set the request (and connection) timeout for a jax-ws-webservice-client generated with the jaxws-maven-plugin. When running my app under tomcat or jetty the timeout works, but when deployed under jboss it doesn't "take". private void setRequestAndConnectionTimeout(Object wsPort) { String REQUEST_TIMEOUT = BindingProviderProperties.REQUEST_TIMEOUT; // "com.sun.xml.ws.request.timeout"; ((BindingProvider) wsPort).getRequestContext().put(REQUEST_TIMEOUT, timeoutInMillisecs); ((BindingProvider) wsPort).getRequestContext().put(JAXWSProperties.CONNECT_TIMEOUT, timeoutInMillisecs); } What is the correct way to do this for JBoss?

    Read the article

  • Problems with this stack implementation

    - by Andersson Melo
    where is the mistake? My code here: typedef struct _box { char *dados; struct _box * proximo; } Box; typedef struct _pilha { Box * topo; }Stack; void Push(Stack *p, char * algo) { Box *caixa; if (!p) { exit(1); } caixa = (Box *) calloc(1, sizeof(Box)); caixa->dados = algo; caixa->proximo = p->topo; p->topo = caixa; } char * Pop(Stack *p) { Box *novo_topo; char * dados; if (!p) { exit(1); } if (p->topo==NULL) return NULL; novo_topo = p->topo->proximo; dados = p->topo->dados; free(p->topo); p->topo = novo_topo; return dados; } void StackDestroy(Stack *p) { char * c; if (!p) { exit(1); } c = NULL; while ((c = Pop(p)) != NULL) { free(c); } free(p); } int main() { int conjunto = 1; char p[30]; int flag = 0; Stack *pilha = (Stack *) calloc(1, sizeof(Stack)); FILE* arquivoIN = fopen("L1Q3.in","r"); FILE* arquivoOUT = fopen("L1Q3.out","w"); if (arquivoIN == NULL) { printf("Erro na leitura do arquivo!\n\n"); exit(1); } fprintf(arquivoOUT,"Conjunto #%d\n",conjunto); while (fscanf(arquivoIN,"%s", p) != EOF ) { if (pilha->topo == NULL && flag != 0) { conjunto++; fprintf(arquivoOUT,"\nConjunto #%d\n",conjunto); } if(strcmp(p, "return") != 0) { Push(pilha, p); } else { p = Pop(pilha); if(p != NULL) { fprintf(arquivoOUT, "%s\n", p); } } flag = 1; } StackDestroy(pilha); return 0; } The Pop function returns the string value read from file. But is not correct and i don't know why.

    Read the article

  • Android MapView: Disable auto zoom

    - by Ola Andersson
    Hi. I have made an Android app that shows a MapView with two overlays, one MyLocationOverlay and one custom overlay. I am programmatically zooming and panning to what I want the map to show. It also auto pans to my current location. The auto pan is moving the map away from what I want to show. So my question is simply: How can I disable the auto pan? Thanks, Ola

    Read the article

  • Assigning specific menu administration rights for roles in drupal

    - by Martin Andersson
    Hello folks. I'm trying to give one of my roles the administrative rights to add/remove content in a specific menu (but not all menus). I think I found a module that should enable something like this, http://drupalmodules.com/module/delegate-menu-administration I've followed the instructions, added the role to my user, checked the "administer some menus" value for that role and checked the "Make admin" field for that role and specific menu in Menus. I also gave the role permissions to change page and story content. However, it still wont let the user add any new content it creates in any menu, and I get an error message saying "warning: Invalid argument supplied for foreach() in /home/martin/www/drupal/modules/delegate_menu_admin/delegate_menu_admin.module on line 346." Line 346 looks like this: foreach ($form['menu']['parent']['#options'] as $key => $value) { I did a print_r($form); in the file just before it and there's no such array that I can see: [menu] => Array ( [#access] => 1 [delete] => Array ( [#access] => ) ) When I gave the role "administer menu" permissions, nothing extra was printed at all, leading me to the assumption that the delegate_menu_admin.module file is not used at all while both the "administer menu" and the "administer some menus" (from the delegate-menu-administration module) permissions are set! Is this some incompatibility between the module because of some drupal update? Or am I just too tired and too stupid? :)

    Read the article

  • Loop XML including all its children using xpath and SimpleXMLElement

    - by Andersson
    Im having a big xml tree with a simple structure. All I want to do is get a node by its attribute using xpath and loop the children. param1 - correct language param1 & param3 - correct node by its id and the parents id. (Need to use parent id when multiplie id appears. The id is not declared as id in DTD) public function getSubmenuNodesRe($language, $id1,$id2) { $result = $this->xml->xpath("//*[@language='$language']//*[@id='$id1']//menuitem[@id='$id2']/*"); return $result; } This works well, I get the node Im expecting. I having no problems looping the array returned by the xpath query. But when i try to loop childnodes all attributes are gone and many of the methods also. Except getName(). function printNodeName($node) { echo $node->getName(). " - \"" . $node['id']. "\"<br>"; if($node->children()->getName() == "menuitem") { $s = $node->children(); printNodeName($s); } } $result = $xmlNode->getSubmenuNodesRe($_GET['language'], 'foo','bar'); if ($result) { while(list( , $node) = each($result)) { if ($node->getName() == "menuitem") { printNodeName($node); } } } Why is that? only the name will be printed for the $s. Really need help to solve this one, any assistance is deeply appreciated! Thanks for your time.

    Read the article

  • Problem on Windows 7 using Image.FromStream to open cmyk+alpha tiff file

    - by Stefan Andersson
    I'm having a problem running the following code om Windows 7 x86 when creating an Image from a lzw encoded cmyk + alpha TIFF file. The FromStream call throws a System.ArgumentException: Parameter is not validRunning When I run the code on Vista or Server 2008 (both x86 and x64 bit) it just works. using System; using System.Drawing; using System.Drawing.Imaging; . . . using (FileStream stream = File.OpenRead(fileName)) { using (Image image = Image.FromStream(stream, false, false)) { // Do something with the image } }

    Read the article

  • A simple way (in java) to remove headers from xml files

    - by Andersson Melo
    I need remove non-xml tags from file generated by another program. The file is some like this: Executing Command - Blah.exe ... -----Command Output----- HTTP/1.1 200 OK Connection: close Content-Type: text/xml <?xml version="1.0"?> <testResults> <right>7</right> <wrong>4</wrong> <ignores>0</ignores> <exceptions>0</exceptions> </finalCounts> </testResults> Exit-Code: 15 How to remove the non-xml text easily in java?

    Read the article

  • A simple way (in java) to remove headers

    - by Andersson Melo
    I need remove non-xml tags from file generated by another program. The file is some like this: Executing Command - Blah.exe ... -----Command Output----- HTTP/1.1 200 OK Connection: close Content-Type: text/xml <?xml version="1.0"?> <testResults> <right>7</right> <wrong>4</wrong> <ignores>0</ignores> <exceptions>0</exceptions> </finalCounts> </testResults> Exit-Code: 15 How to remove the non-xml text easily in java?

    Read the article

  • Commvault Oracle RMAN Restore to new host

    - by Glenn Stauffer
    We use Commvault Simpana 8 and I have a situation where I have backups of an Oracle database on tape that were taken from Host A. Host A suffered a disk failure (lost its raid configuration) and the sys admins are trying to restore it; in the meantime, I'd working to bring the database back up on another host - Host B. I'm running into problems and am trying to sort out the parameters that need to be passed to the Commvault media agent to get this to work. Unfortunately, I do not have access to Commvault support and the backup person is unavailable. Any one have a clue? The backups are there and the media agent reported a successful write when they ran last night. This is what fails: RMAN run { allocate channel t1 device type sbt_tape parms='SBT_LIBRARY=/usr/local/galaxy/Base/libobk.so,BLKSIZE=262144, ENV=(CvClientName=dbsrv2,CvInstanceName=Instance001, CVOraRacDBName=BBDB, CVOraRACDBClientName=BBDB)'; restore spfile to pfile '/tmp/bbdb.ora' from autobackup; }2 3 4 allocated channel: t1 channel t1: sid=34 devtype=SBT_TAPE channel t1: CommVault Systems for Oracle: Version 7.0.0(Build76) Starting restore at 09-MAY-10 channel t1: looking for autobackup on day: 20100509 channel t1: autobackup found: c-3941155360-20100509-01 released channel: t1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 05/09/2010 18:01:35 ORA-19870: error reading backup piece c-3941155360-20100509-01 ORA-19507: failed to retrieve sequential file, handle="c-3941155360-20100509-01", parms="" ORA-27029: skgfrtrv: sbtrestore returned error ORA-19511: Error received from media manager layer, error text: sbtrestore: Job[0] thread[26316]: InitializeCLRestore() failed.

    Read the article

  • Commvault Oracle RMAN Restore to new host

    - by Glenn Stauffer
    We use Commvault Simpana 8 and I have a situation where I have backups of an Oracle database on tape that were taken from Host A. Host A suffered a disk failure (lost its raid configuration) and the sys admins are trying to restore it; in the meantime, I'd working to bring the database back up on another host - Host B. I'm running into problems and am trying to sort out the parameters that need to be passed to the Commvault media agent to get this to work. Unfortunately, I do not have access to Commvault support and the backup person is unavailable. Any one have a clue? The backups are there and the media agent reported a successful write when they ran last night. This is what fails: run { allocate channel t1 device type sbt_tape parms='SBT_LIBRARY=/usr/local/galaxy/Base/libobk.so,BLKSIZE=262144, ENV=(CvClientName=dbsrv2,CvInstanceName=Instance001, CVOraSID=BBPROD)'; restore spfile to pfile '/tmp/bbdb.ora' from autobackup; } allocated channel: t1 channel t1: sid=34 devtype=SBT_TAPE channel t1: CommVault Systems for Oracle: Version 7.0.0(Build76) Starting restore at 09-MAY-10 channel t1: looking for autobackup on day: 20100509 channel t1: autobackup found: c-3941155360-20100509-01 released channel: t1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 05/09/2010 18:01:35 ORA-19870: error reading backup piece c-3941155360-20100509-01 ORA-19507: failed to retrieve sequential file, handle="c-3941155360-20100509-01", parms="" ORA-27029: skgfrtrv: sbtrestore returned error ORA-19511: Error received from media manager layer, error text: sbtrestore: Job[0] thread[26316]: InitializeCLRestore() failed.

    Read the article

  • Setting bluetooth passcode on a HP Notebook

    - by Glenn Slaven
    I've got a HP Compaq nx6320 & I just installed the HP bluetooth drivers (WinXP) and I'm trying to pair my Samsung Windows Mobile phone with it, but when I do, the phone asks me to enter the passcode for the computer, but I never set one in the install process & I've got no idea how to set it now. Does anyone know where this option is?

    Read the article

  • Blocking 'good' bots in nginx with multiple conditions for certain off-limits URL's where humans can go

    - by Glenn Plas
    After 2 days of searching/trying/failing I decided to post this here, I haven't found any example of someone doing the same nor what I tried seems to be working OK. I'm trying to send a 403 to bots not respecting the robots.txt file (even after downloading it several times). Specifically Googlebot. It will support the following robots.txt definition. User-agent: * Disallow: /*/*/page/ The intent is to allow Google to browse whatever they can find on the site but return a 403 for the following type of request. Googlebot seems to keep on nesting these links eternally adding paging block after block: my_domain.com:80 - 66.x.67.x - - [25/Apr/2012:11:13:54 +0200] "GET /2011/06/ page/3/?/page/2//page/3//page/2//page/3//page/2//page/2//page/4//page/4//pag e/1/&wpmp_switcher=desktop HTTP/1.1" 403 135 "-" "Mozilla/5.0 (compatible; G ooglebot/2.1; +http://www.google.com/bot.html)" It's a wordpress site btw. I don't want those pages to show up, even though after the robots.txt info got through, they stopped for a while only to begin crawling again later. It just never stops .... I do want real people to see this. As you can see, google get a 403 but when I try this myself in a browser I get a 404 back. I want browsers to pass. root@my_domain:# nginx -V nginx version: nginx/1.2.0 I tried different approaches, using a map and plain old nono if's and they both act the same: (under http section) map $http_user_agent $is_bot { default 0; ~crawl|Googlebot|Slurp|spider|bingbot|tracker|click|parser|spider 1; } (under the server section) location ~ /(\d+)/(\d+)/page/ { if ($is_bot) { return 403; # Please respect the robots.txt file ! } } I recently had to polish up my Apache skills for a client where I did about the same thing like this : # Block real Engines , not respecting robots.txt but allowing correct calls to pass # Google RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(compatible;\ Googlebot/2\.[01];\ \+http://www\.google\.com/bot\.html\)$ [NC,OR] # Bing RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(compatible;\ bingbot/2\.[01];\ \+http://www\.bing\.com/bingbot\.htm\)$ [NC,OR] # msnbot RewriteCond %{HTTP_USER_AGENT} ^msnbot-media/1\.[01]\ \(\+http://search\.msn\.com/msnbot\.htm\)$ [NC,OR] # Slurp RewriteCond %{HTTP_USER_AGENT} ^Mozilla/5\.0\ \(compatible;\ Yahoo!\ Slurp;\ http://help\.yahoo\.com/help/us/ysearch/slurp\)$ [NC] # block all page searches, the rest may pass RewriteCond %{REQUEST_URI} ^(/[0-9]{4}/[0-9]{2}/page/) [OR] # or with the wpmp_switcher=mobile parameter set RewriteCond %{QUERY_STRING} wpmp_switcher=mobile # ISSUE 403 / SERVE ERRORDOCUMENT RewriteRule .* - [F,L] # End if match This does a bit more than I asked nginx to do but it's about the same principle, I'm having a hard time figuring this out for nginx. So my question would be, why would nginx serve my browser a 404 ? Why isn't it passing, The regex isn't matching for my UA: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.30 Safari/536.5" There are tons of example to block based on UA alone, and that's easy. It also looks like the matchin location is final, e.g. it's not 'falling' through for regular user, I'm pretty certain that this has some correlation with the 404 I get in the browser. As a cherry on top of things, I also want google to disregard the parameter wpmp_switcher=mobile , wpmp_switcher=desktop is fine but I just don't want the same content being crawled multiple times. Even though I ended up adding wpmp_switcher=mobile via the google webmaster tools pages (requiring me to sign up ....). that also stopped for a while but today they are back spidering the mobile sections. So in short, I need to find a way for nginx to enforce the robots.txt definitions. Can someone shell out a few minutes of their lives and push me in the right direction please ? I really appreciate ANY response that makes me think harder ;-)

    Read the article

  • Can I setup a link SQL server connection between servers on different networks?

    - by Glenn Slaven
    We have a production SQL server hosted offsite at a hosting company, and we have a staging environment within our own network. We want to be able to setup a SQL job that copies content from a table on the staging server to prod on a regular basis, and I think we need to setup a linked server connection to do this. What do I need to get the hosting company to do to allow us to set this up? We have RDP access to the production servers, I just need to know what network and security configurations need to happen from the hosting company's perspective so I can ask them to do it.

    Read the article

  • Getting the error "SMTP server cannot create a file in the queue directory C:\Inetpub\mailroot\Queue\"

    - by Glenn Slaven
    We're using the default SMTP server for our websites to send mail with, but in the last day sending messages started getting this error: Insufficient system storage. The server response was: 4.3.1 Out of memory Further digging found this message in the System event log: SMTP server cannot create a file in the queue directory C:\Inetpub\mailroot\Queue\ I've since given the Everyone account full control of the mailroot folder but it's still happening. There's enough space on the server and to the best of my knowledge nothing on the server has been changed

    Read the article

  • Federated access to desktop and network resources in MS AD domains

    - by Glenn Stauffer
    We are looking for a way to provide members of three loosely connected organizations with access to authenticated resources such as file shares, printers, and lab computers. I've seen federation facilities for web resources; is ther something similar for domain logins? Our Active directory domains are not connected so we would have to use email addresses for the username to insure uniqueness. Is there any openid like mechanism that works for AD logins?

    Read the article

  • Sonicwall settings for Polycom TFTP

    - by Michael Glenn
    I'm switching our VoIP phones (Polycom 301s and 501s) to our data network. They were previously segmented to their own network. This means disabling the DHCP on the Trixbox (Asterisk) server and configuring the Sonicwall TZ 210 DHCP to indicate that Trixbox is the TFTP server. The Polycom phones are stating "could not contact boot server". All phones are configured to TFTP and were confirmed working when previously using the Trixbox server for DHCP. Trixbox DHCP is now turned off. I've configured options 66(as String), 128(as IP) and 150(as IP) in DHCP and added them to a TFTP Option Group. I've enabled "Allow BOOTP Clients to use Range" for the Dynamic IP range and assigned the Option Group TFTP as the DHCP Generic Option Group. Any idea what I'm missing? Is there a separate tool to inspect the DHCP response to compare Trixbox to the Sonicwall?

    Read the article

  • What decent small-office level routers are there

    - by Glenn Slaven
    So let's say I have a network of less than 20 computers including a server that needs to be accessed externally. What router/firewall solutions would you recommend? It can be either hardware or software and would need to be able to do NAT Firewall DMZ Native VPN if possible Some form of network bandwidth monitoring Update: I've accepted the answer I liked but this question probably doesn't have a definitive answer, it would depend on your requirements. Please leave more suggestions with an explanation as to why it works well in your situation.

    Read the article

< Previous Page | 1 2 3 4 5 6 7  | Next Page >