<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: can't get new crypt2() function to work in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199940#M732995</link>
    <description>Hi Darren:&lt;BR /&gt;&lt;BR /&gt;I don't have 11.31 available nor do I have the PHI product for 11.23 installed, but at least in earlier interfaces you should have specified:&lt;BR /&gt;&lt;BR /&gt;#include &lt;CRYPT.H&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;/CRYPT.H&gt;</description>
    <pubDate>Mon, 21 Sep 2009 19:09:21 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2009-09-21T19:09:21Z</dc:date>
    <item>
      <title>can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199939#M732994</link>
      <description>&lt;!--!*#--&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I've been reading about the new crypt2 library introduced by the PHI11i3 bundle, which enabled SHA512 password hashing.  I'm trying to understand exactly what the new libraries do, but get can't get my test programs to compile.  Here's what I get an 'ld: Unsatisfied symbol "crypt2"' error every time I try to compile my program.  Here's what I did:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# swlist PHI11i3&lt;BR /&gt;# Initializing...&lt;BR /&gt;# Contacting target "rx16u831"...&lt;BR /&gt;#&lt;BR /&gt;# Target:  rx16u831:/&lt;BR /&gt;#&lt;BR /&gt;# PHI11i3               B.11.31.02     HP-UX 11.31 Password Hashing Infrastructure&lt;BR /&gt;  PHI11i3.SHA11i3       B.11.31.02     HP-UX 11.31 SHA11i3 Product&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/encrypter.c&lt;BR /&gt;#include &lt;PROT.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;char *result;&lt;BR /&gt;result=crypt2("aa","user1");&lt;BR /&gt;printf("\nThe password hash is %s\n", result);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cc -Llibsec encrypter.c -o encrypter&lt;BR /&gt;ld: Unsatisfied symbol "crypt2" in file encrypter.o&lt;BR /&gt;1 errors.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I'm guessing that I need to specify another -L, but I'm not sure what it should be.&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for your help.&lt;BR /&gt;&lt;BR /&gt;Darren&lt;/STDIO.H&gt;&lt;/PROT.H&gt;</description>
      <pubDate>Mon, 21 Sep 2009 18:56:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199939#M732994</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-21T18:56:34Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199940#M732995</link>
      <description>Hi Darren:&lt;BR /&gt;&lt;BR /&gt;I don't have 11.31 available nor do I have the PHI product for 11.23 installed, but at least in earlier interfaces you should have specified:&lt;BR /&gt;&lt;BR /&gt;#include &lt;CRYPT.H&gt;&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...&lt;BR /&gt;&lt;BR /&gt;&lt;/CRYPT.H&gt;</description>
      <pubDate>Mon, 21 Sep 2009 19:09:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199940#M732995</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-21T19:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199941#M732996</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;I added "#include &lt;CRYPT.H&gt;", but still no luck.  Thanks for taking a look.  &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Darren&lt;/CRYPT.H&gt;</description>
      <pubDate>Mon, 21 Sep 2009 19:14:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199941#M732996</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-21T19:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199942#M732997</link>
      <description>Hi (again) Darren:&lt;BR /&gt;&lt;BR /&gt;Try looking for a 'crypt2' header:&lt;BR /&gt;&lt;BR /&gt;# find  /usr/include -type f -name "crypt*"&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 21 Sep 2009 19:19:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199942#M732997</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2009-09-21T19:19:30Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199943#M732998</link>
      <description>James,&lt;BR /&gt;&lt;BR /&gt;I tried two variations on the find command, but the files found were already included in my program.&lt;BR /&gt;&lt;BR /&gt;# find /usr/include -type f -name "crypt*"&lt;BR /&gt;/usr/include/crypt.h&lt;BR /&gt;&lt;BR /&gt;# find /usr/include -type f -exec grep -l crypt2 {} \;&lt;BR /&gt;/usr/include/prot.h&lt;BR /&gt;&lt;BR /&gt;# cat encrypter.c&lt;BR /&gt;#include &lt;PROT.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;CRYPT.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;char *result;&lt;BR /&gt;result=crypt2("aa","user1");&lt;BR /&gt;printf("\nThe password hash is %s\n", result);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# cc encrypter.c -o encrypter&lt;BR /&gt;ld: Unsatisfied symbol "crypt2" in file encrypter.o&lt;BR /&gt;1 errors.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Darren&lt;/CRYPT.H&gt;&lt;/STDIO.H&gt;&lt;/PROT.H&gt;</description>
      <pubDate>Mon, 21 Sep 2009 19:28:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199943#M732998</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-21T19:28:54Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199944#M732999</link>
      <description>Try "swlist -l file PHI11i3" as root to see what files are included in the package, this could give you a hint on what needs to be included.&lt;BR /&gt;&lt;BR /&gt;Good luck</description>
      <pubDate>Mon, 21 Sep 2009 22:49:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199944#M732999</guid>
      <dc:creator>Olivier Masse</dc:creator>
      <dc:date>2009-09-21T22:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199945#M733000</link>
      <description>Olivier,&lt;BR /&gt;&lt;BR /&gt;Good idea.  I actually did try that earlier, but no luck.  The product appears to simply deliver a man page and a toggle file to enable the functionality.  I wonder if the functionality was there in the original 11i v3 release but wasn't enabled because it hadn't been fully tested(?).  Seems strange.  The functionality does work, though.  If I change a user's password, the resulting ciphertext is much longer than it was in the past.&lt;BR /&gt;&lt;BR /&gt;Darren&lt;BR /&gt;&lt;BR /&gt;# swlist -l file PHI11i3&lt;BR /&gt;# Initializing...&lt;BR /&gt;# Contacting target "rx16u831"...&lt;BR /&gt;#&lt;BR /&gt;# Target:  rx16u831:/&lt;BR /&gt;#&lt;BR /&gt;# PHI11i3                       B.11.31.02     HP-UX 11.31 Password Hashing Infrastructure&lt;BR /&gt;# PHI11i3.SHA11i3               B.11.31.02     HP-UX 11.31 SHA11i3 Product&lt;BR /&gt;# PHI11i3.SHA11i3.SHA-CONF      B.11.31.02     SHA11i3 Configuration Files&lt;BR /&gt;  PHI11i3.SHA11i3.SHA-CONF: /etc/default/ENABLE_CRYPT_ENHANCEMENT               &lt;BR /&gt;# PHI11i3.SHA11i3.SHA-ENG-A-MAN B.11.31.02     SHA11i3 English Manpages&lt;BR /&gt;  PHI11i3.SHA11i3.SHA-ENG-A-MAN: /usr/share/man/man3.Z/crypt2.3c</description>
      <pubDate>Tue, 22 Sep 2009 01:41:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199945#M733000</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-22T01:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199946#M733001</link>
      <description>Hello Darren!&lt;BR /&gt;&lt;BR /&gt;Assuming the PHI11i3 bundle is correctly installed ( &lt;A href="https://h20392.www2.hp.com/portal/swdepot/displayInstallInfo.do?productNumber=PHI11i3" target="_blank"&gt;https://h20392.www2.hp.com/portal/swdepot/displayInstallInfo.do?productNumber=PHI11i3&lt;/A&gt; )&lt;BR /&gt;&lt;BR /&gt;you could try this:&lt;BR /&gt;&lt;BR /&gt;1. Take a look at prot.h (and if you were so kind please attach it in next post since I have no 11i v3) to see how crypt2 is included, declared, defined.&lt;BR /&gt;&lt;BR /&gt;2. Do brute force on symbol matching in libs:&lt;BR /&gt;&lt;BR /&gt;find / -name '*.sl' -exec nm {} \; -print | grep -i -e crypt2 -e '^/' | more&lt;BR /&gt;&lt;BR /&gt;Note the *.sl for PA-RISC (use *.so for IPF). If you're sure all your libs are only in /usr/lib and /opt:&lt;BR /&gt;&lt;BR /&gt;for l in /usr/lib /opt&lt;BR /&gt;do&lt;BR /&gt;find $l -name '*.sl' -exec nm {} \; -print | grep -i -e crypt2 -e '^/'&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If the symbol is there, it will show up...&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Kobylka&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 13:29:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199946#M733001</guid>
      <dc:creator>kobylka</dc:creator>
      <dc:date>2009-09-23T13:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199947#M733002</link>
      <description>Kobylka,&lt;BR /&gt;&lt;BR /&gt;THanks so much for looking at my issue!  I ran the for loop as you suggested and got a long list of several hundred file paths.  I think these might be the pertinent lines:&lt;BR /&gt;&lt;BR /&gt;/usr/lib/hpux32/librwtool_v2.so&lt;BR /&gt;[418]    |     67351168|     640|FUNC |GLOB |0|   .text|crypt2&lt;BR /&gt;[356]    |     67351840|     400|FUNC |GLOB |0|   .text|crypt2_passwd_hash&lt;BR /&gt;[543]    |     67353600|     304|FUNC |GLOB |0|   .text|crypt2_passwd_match&lt;BR /&gt;[431]    |     67352256|    1344|FUNC |GLOB |0|   .text|crypt2_passwd_salt&lt;BR /&gt;&lt;BR /&gt;/usr/lib/hpux64/libprocsm.so&lt;BR /&gt;[418]    |   4611686018427643296|     656|FUNC |GLOB |0|   .text|crypt2&lt;BR /&gt;[356]    |   4611686018427644000|     400|FUNC |GLOB |0|   .text|crypt2_passwd_h&lt;BR /&gt;ash&lt;BR /&gt;[543]    |   4611686018427645824|     336|FUNC |GLOB |0|   .text|crypt2_passwd_m&lt;BR /&gt;atch&lt;BR /&gt;[431]    |   4611686018427644416|    1408|FUNC |GLOB |0|   .text|crypt2_passwd_s&lt;BR /&gt;alt&lt;BR /&gt;&lt;BR /&gt;I tried re-compiling with those libraries specifically included, though, and still got ld errors:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;#  cc -v -L/usr/lib/hpux32/librwtool_v2.so -L/usr/lib/hpux64/libprocsm.so /tmp/encrypter.c -o /tmp/encrypter&lt;BR /&gt;&lt;BR /&gt; /usr/ccs/lbin/ecom -architecture 32 -ia64abi all -ext on -lang c -exception off -sysdir /usr/include -inline_power 0 -link_type dynamic -fpeval float -tls_dyn on -target_os 11.31 --sys_include /usr/include -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D_ILP32 -D__unordered= -D__synchronous= -D__non_sequential= -D__side_effect_free= -D__HP_cc=61200 -D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG -D_INLINE_ASM -D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT -D_FLT_EVAL_METHOD=0 -ucode hdriver=optlevel%1%:inline=inl_level%0% -plusolistoption -Ol06const! -plusolistoption -Ol13moderate! -plusooption -Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,ib,pl,sd,ll,rl,dl,Lt,ol,fl,lm,ts,rd,dp,If! /tmp/encrypter.c&lt;BR /&gt;"/tmp/encrypter.c", line 16: warning #2513-D: a value of type "int" cannot be&lt;BR /&gt;          assigned to an entity of type "char *"&lt;BR /&gt;  salt = crypt_2passwd_salt(oldhash, username);&lt;BR /&gt;       ^&lt;BR /&gt;&lt;BR /&gt;LPATH=/usr/lib/hpux32:/opt/langtools/lib/hpux32:/usr/lib/hpux64:/opt/langtools/lib/hpux64&lt;BR /&gt; /usr/ccs/bin/ld -o /tmp/encrypter -u___exit -umain -L /usr/lib/hpux32/librwtool_v2.so -L /usr/lib/hpux64/libprocsm.so encrypter.o -lc&lt;BR /&gt;ld: Unsatisfied symbol "crypt2" in file encrypter.o&lt;BR /&gt;ld: Unsatisfied symbol "crypt_2passwd_salt" in file encrypter.o&lt;BR /&gt;2 errors.&lt;BR /&gt; removing /var/tmp/AAA026567&lt;BR /&gt;&lt;BR /&gt;Per your request, I've attached the prot.h file from my system.  You probably already discovered this, but the man page is available on the web at &lt;A href="http://docs.hp.com/en/B3921-60631/crypt2.3C.html." target="_blank"&gt;http://docs.hp.com/en/B3921-60631/crypt2.3C.html.&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks again for taking a look.&lt;BR /&gt;&lt;BR /&gt;Darren&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 14:53:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199947#M733002</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T14:53:11Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199948#M733003</link>
      <description>Oops... previous attached copy of prot.h cot truncated.  Here's the complete file.&lt;BR /&gt;&lt;BR /&gt;Darren</description>
      <pubDate>Wed, 23 Sep 2009 14:55:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199948#M733003</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T14:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199949#M733004</link>
      <description>Hello Darren!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Ok, we got the symbols, now try to link them like this:&lt;BR /&gt;&lt;BR /&gt;1. If your executable is 32bit you must use the 32bit library:&lt;BR /&gt;&lt;BR /&gt;# cc -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux32 -lrwtool_v2&lt;BR /&gt;&lt;BR /&gt;2. If 64bit:&lt;BR /&gt;&lt;BR /&gt;# cc -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lprocsm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;In your compile command you mixed both libraries (one is 32bit and the other 64 bit). This is not allowed.&lt;BR /&gt;&lt;BR /&gt;Furthermore note the flags:&lt;BR /&gt;&lt;BR /&gt;-L is used to specify a library search path&lt;BR /&gt;-l is used to specify the shortened name of the library to link with&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Kobylka</description>
      <pubDate>Wed, 23 Sep 2009 17:38:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199949#M733004</guid>
      <dc:creator>kobylka</dc:creator>
      <dc:date>2009-09-23T17:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199950#M733005</link>
      <description>Kobylka,&lt;BR /&gt;&lt;BR /&gt;Thanks for continueing to look at this.  I'm on a 64-bit Itanium so I tried the hpux64 library as you suggested.  Still no luck.  I tried the 32-bit command, but that didn't work either.  ): &lt;BR /&gt;&lt;BR /&gt;# cc -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lprocsm&lt;BR /&gt;&lt;BR /&gt; /usr/ccs/lbin/ecom -architecture 32 -ia64abi all -ext on -lang c -exception off -sysdir /usr/include -inline_power 0 -link_type dynamic -fpeval float -tls_dyn on -target_os 11.31 --sys_include /usr/include -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D_ILP32 -D__unordered= -D__synchronous= -D__non_sequential= -D__side_effect_free= -D__HP_cc=61200 -D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG -D_INLINE_ASM -D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT -D_FLT_EVAL_METHOD=0 -ucode hdriver=optlevel%1%:inline=inl_level%0% -plusolistoption -Ol06const! -plusolistoption -Ol13moderate! -plusooption -Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,ib,pl,sd,ll,rl,dl,Lt,ol,fl,lm,ts,rd,dp,If! /tmp/encrypter.c&lt;BR /&gt;"/tmp/encrypter.c", line 16: warning #2513-D: a value of type "int" cannot be&lt;BR /&gt;          assigned to an entity of type "char *"&lt;BR /&gt;  salt = crypt_2passwd_salt(oldhash, username);&lt;BR /&gt;       ^&lt;BR /&gt;LPATH=&lt;BR /&gt; /usr/ccs/bin/ld -o /tmp/encrypter -u___exit -umain encrypter.o -L /usr/lib/hpux64 -lprocsm -lc&lt;BR /&gt;ld: Mismatched ABI for -lprocsm, found /usr/lib/hpux64/libprocsm.so&lt;BR /&gt;Fatal error.&lt;BR /&gt; removing /var/tmp/AAA000991&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 18:03:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199950#M733005</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T18:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199951#M733006</link>
      <description>Hello Darren!&lt;BR /&gt;&lt;BR /&gt;For 64 bit the 64bit data model flag must be included:&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lprocsm&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It should work using just -L/usr/lib too.&lt;BR /&gt;In the case of 32 bit executable you can use +DD32 or not, by default the compiler generates 32 bit binaries.&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Kobylka</description>
      <pubDate>Wed, 23 Sep 2009 18:18:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199951#M733006</guid>
      <dc:creator>kobylka</dc:creator>
      <dc:date>2009-09-23T18:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199952#M733007</link>
      <description>Really appreciate your ongoing efforts, here, Kobylka.  Here's the latest attempt:&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lprocsm&lt;BR /&gt;&lt;BR /&gt; /usr/ccs/lbin/ecom -architecture 64 -ia64abi all -ext on -lang c -exception off -sysdir /usr/include -inline_power 0 -link_type dynamic -fpeval float -tls_dyn on -target_os 11.31 --sys_include /usr/include -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D_LP64 -D__LP64__ -D__unordered= -D__synchronous= -D__non_sequential= -D__side_effect_free= -D__HP_cc=61200 -D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG -D_INLINE_ASM -D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT -D_FLT_EVAL_METHOD=0 -ucode hdriver=optlevel%1%:inline=inl_level%0% -plusolistoption -Ol06const! -plusolistoption -Ol13moderate! -plusooption -Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,ib,pl,sd,ll,rl,dl,Lt,ol,fl,lm,ts,rd,dp,If! /tmp/encrypter.c&lt;BR /&gt;"/tmp/encrypter.c", line 16: warning #2513-D: a value of type "int" cannot be&lt;BR /&gt;          assigned to an entity of type "char *"&lt;BR /&gt;  salt = crypt_2passwd_salt(oldhash, username);&lt;BR /&gt;       ^&lt;BR /&gt;&lt;BR /&gt;LPATH=&lt;BR /&gt; /usr/ccs/bin/ld -o /tmp/encrypter -u___exit -umain encrypter.o -L /usr/lib/hpux64 -lprocsm -lc&lt;BR /&gt;ld: Unsatisfied symbol "crypt2" in file encrypter.o&lt;BR /&gt;ld: Unsatisfied symbol "crypt_2passwd_salt" in file encrypter.o&lt;BR /&gt;2 errors.&lt;BR /&gt; removing /var/tmp/AAA001527&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 18:21:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199952#M733007</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T18:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199953#M733008</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;When you tried earlier in this post to lookup the "crypt2" symbol using:&lt;BR /&gt;&lt;BR /&gt;find / -name '*.sl' -exec nm {} \; -print | grep -i -e crypt2 -e '^/' | more&lt;BR /&gt;&lt;BR /&gt;be sure to pick the correct libraries:&lt;BR /&gt;&lt;BR /&gt;The nm gets executed first (showing the macthing symbols, if any) and THEN prints the name of the library (not before the symbols are displayed). Please make sure the libraries are the correct ones.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Kobylka&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 18:44:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199953#M733008</guid>
      <dc:creator>kobylka</dc:creator>
      <dc:date>2009-09-23T18:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199954#M733009</link>
      <description>Kobylka,&lt;BR /&gt;&lt;BR /&gt;Still no luck.  ):&lt;BR /&gt;&lt;BR /&gt;Darren&lt;BR /&gt;&lt;BR /&gt;# find /usr -name '*.so' -exec nm {} \; -print | grep -i -e crypt2 -e '^/' | more&lt;BR /&gt;&lt;BR /&gt;[418]    |   4611686018427643296|     656|FUNC |GLOB |0|   .text|crypt2&lt;BR /&gt;[356]    |   4611686018427644000|     400|FUNC |GLOB |0|   .text|crypt2_passwd_h&lt;BR /&gt;ash&lt;BR /&gt;[543]    |   4611686018427645824|     336|FUNC |GLOB |0|   .text|crypt2_passwd_m&lt;BR /&gt;atch&lt;BR /&gt;[431]    |   4611686018427644416|    1408|FUNC |GLOB |0|   .text|crypt2_passwd_s&lt;BR /&gt;alt&lt;BR /&gt;/usr/lib/hpux64/libsec.so&lt;BR /&gt;&lt;BR /&gt;# file /usr/lib/hpux64/libsec.so&lt;BR /&gt;/usr/lib/hpux64/libsec.so:      ELF-64 shared object file - IA64&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -llibsec&lt;BR /&gt;&lt;BR /&gt; /usr/ccs/lbin/ecom -architecture 64 -ia64abi all -ext on -lang c -exception off -sysdir /usr/include -inline_power 0 -link_type dynamic -fpeval float -tls_dyn on -target_os 11.31 --sys_include /usr/include -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D_LP64 -D__LP64__ -D__unordered= -D__synchronous= -D__non_sequential= -D__side_effect_free= -D__HP_cc=61200 -D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG -D_INLINE_ASM -D_BIND_LIBCALLS -D_Math_errhandling=MATH_ERREXCEPT -D_FLT_EVAL_METHOD=0 -ucode hdriver=optlevel%1%:inline=inl_level%0% -plusolistoption -Ol06const! -plusolistoption -Ol13moderate! -plusooption -Oq01,al,ag,cn,sz,ic,vo,Mf,Po,es,rs,Rf,Pr,sp,in,cl,om,vc,pi,fa,pe,rr,pa,pv,nf,cp,lx,Pg,ug,lu,lb,uj,dn,sg,pt,kt,em,np,ar,rp,dl,fs,bp,wp,pc,mp,lr,cx,cr,pi,so,Rc,fa,ft,fe,ap,st,lc,Bl,sr,ib,pl,sd,ll,rl,dl,Lt,ol,fl,lm,ts,rd,dp,If! /tmp/encrypter.c&lt;BR /&gt;"/tmp/encrypter.c", line 16: warning #2513-D: a value of type "int" cannot be&lt;BR /&gt;          assigned to an entity of type "char *"&lt;BR /&gt;  salt = crypt_2passwd_salt(oldhash, username);&lt;BR /&gt;       ^&lt;BR /&gt;&lt;BR /&gt;LPATH=&lt;BR /&gt; /usr/ccs/bin/ld -o /tmp/encrypter -u___exit -umain encrypter.o -L /usr/lib/hpux64 -llibsec -lc&lt;BR /&gt;ld: Can't find library for -llibsec&lt;BR /&gt;Fatal error.&lt;BR /&gt; removing /var/tmp/AAA009384&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 18:56:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199954#M733009</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T18:56:42Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199955#M733010</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lsec &lt;BR /&gt;&lt;BR /&gt;try also&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 -v /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib -lsec &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Kobylka</description>
      <pubDate>Wed, 23 Sep 2009 19:01:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199955#M733010</guid>
      <dc:creator>kobylka</dc:creator>
      <dc:date>2009-09-23T19:01:02Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199956#M733011</link>
      <description>Still no luck.&lt;BR /&gt;&lt;BR /&gt;# cc +DD64  /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib -lsec&lt;BR /&gt;&lt;BR /&gt;"/tmp/encrypter.c", line 16: warning #2513-D: a value of type "int" cannot be&lt;BR /&gt;          assigned to an entity of type "char *"&lt;BR /&gt;  salt = crypt_2passwd_salt(oldhash, username);&lt;BR /&gt;       ^&lt;BR /&gt;&lt;BR /&gt;ld: Mismatched ABI (not an ELF file) for -lsec, found /usr/lib/libsec.sl&lt;BR /&gt;Fatal error.&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lsec&lt;BR /&gt;&lt;BR /&gt;"/tmp/encrypter.c", line 16: warning #2513-D: a value of type "int" cannot be&lt;BR /&gt;          assigned to an entity of type "char *"&lt;BR /&gt;  salt = crypt_2passwd_salt(oldhash, username);&lt;BR /&gt;       ^&lt;BR /&gt;&lt;BR /&gt;ld: Unsatisfied symbol "crypt_2passwd_salt" in file encrypter.o&lt;BR /&gt;1 errors.&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 19:10:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199956#M733011</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T19:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199957#M733012</link>
      <description>Hi!&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;ld: Unsatisfied symbol "crypt_2passwd_salt" in file encrypter.o&lt;BR /&gt;1 errors.&lt;BR /&gt;&lt;BR /&gt;The symbol should be "crypt2_passwd_salt". Correct your code and compile again in 64 bit with 64 bit libpath:&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lsec&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kind regards,&lt;BR /&gt;&lt;BR /&gt;Kobylka&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 19:19:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199957#M733012</guid>
      <dc:creator>kobylka</dc:creator>
      <dc:date>2009-09-23T19:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: can't get new crypt2() function to work</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199958#M733013</link>
      <description>Kobylka,&lt;BR /&gt;&lt;BR /&gt;Boy do Ifeel sheepish!  That spelling mistake was the cause of the problem from the very beginning!  Thank you very, very much for your assistance.  If I could, I'd give you 15 points for sticking with this issue through so many iterations.  For the benefit of future ITRC users, here's the final solution.  Thanks again!&lt;BR /&gt;&lt;BR /&gt;# cat /tmp/encrypter.c&lt;BR /&gt;#include &lt;PROT.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;char *username;&lt;BR /&gt;char *oldhash;&lt;BR /&gt;char *salt;&lt;BR /&gt;char *key;&lt;BR /&gt;char *hashstring;&lt;BR /&gt;username = "user1";&lt;BR /&gt;key = "mypass";&lt;BR /&gt;oldhash = "$6$";     /* "$6$" = SHA512, "aa" = 3DES */&lt;BR /&gt;salt = crypt2_passwd_salt(oldhash, username);&lt;BR /&gt;hashstring = crypt2(key, salt);&lt;BR /&gt;printf("username = %s\n", username);&lt;BR /&gt;printf("salt = %s\n", salt);&lt;BR /&gt;printf("key = %s\n", key);&lt;BR /&gt;printf("hashstring = %s\n", hashstring);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# cc +DD64 /tmp/encrypter.c -o /tmp/encrypter -L/usr/lib/hpux64 -lsec&lt;BR /&gt;&lt;BR /&gt;# /tmp/encrypter&lt;BR /&gt;username = user1&lt;BR /&gt;salt = $6$VSw26.nD&lt;BR /&gt;key = mypass&lt;BR /&gt;hashstring = $6$VSw26.nD$yAt6TGoOlc9DLUY341qs0Kqo8D8HXFvZicqTSltK0z6ayTJ/dj9pn7RbHQ8mhC.t7QabgjRUg0Ts/QnKcAm7A1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STDIO.H&gt;&lt;/PROT.H&gt;</description>
      <pubDate>Wed, 23 Sep 2009 19:29:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/can-t-get-new-crypt2-function-to-work/m-p/5199958#M733013</guid>
      <dc:creator>d miller_2</dc:creator>
      <dc:date>2009-09-23T19:29:53Z</dc:date>
    </item>
  </channel>
</rss>

