[ndnSIM] Using openssl with ndnSIM
Cesar Ghali
cghali at uci.edu
Sun Feb 15 16:17:00 PST 2015
Perfect. Thanks.
Cesar
> On Feb 15, 2015, at 16:14, Alex Afanasyev <alexander.afanasyev at ucla.edu> wrote:
>
> Hi Cesar,
>
> Yes. There is no longer openssl branch or the need for such branch. In the new version, you can make full use of CryptoPP library. Also, many of the security-related tasks can be done using ndn-cxx library directly, which also uses cryptopp library internally.
>
> —
> Alex
>
>> On Feb 15, 2015, at 4:04 PM, Cesar Ghali <cghali at uci.edu> wrote:
>>
>> Hi,
>>
>> I remember in ndnSIM 1.0 Alex created a branch (feature/with-openssl) to support using openssl with ndnSIM. I can’t see this branch in the latest ndnSIM version and I’m wondering if the feature was merged with the master branch. I didn’t try to use openssl libraries with ndnSIM yet, I just wanted to make sure that I can compile if I do.
>>
>> Thanks,
>> Cesar
>>
>> --
>> PGP Key: http://www.cesarghali.info/contact.html
>> PGP Key ID: 0x455D8052
>>
>>> On May 11, 2013, at 10:24 PM, Cesar Ghali <cghali at uci.edu> wrote:
>>>
>>> Thanks Alex, that was the problem. I switched the branch but forgot to configure again.
>>>
>>> Regards,
>>> Cesar
>>>
>>>
>>>> On 05/10/2013 11:37 AM, Alex Afanasyev wrote:
>>>> Hi Cesar,
>>>>
>>>> Did you reconfigure NS-3/ndnSIM after the merging? If not, then it could be the problem.
>>>>
>>>> Here is my output on Linux machine with compilation of the same .cc file:
>>>>
>>>> [1019/1763] cxx: src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc -> build/src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc.1.o
>>>> 11:32:15 runner ['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-fno-strict-aliasing', '-fwrapv', '-fstack-protector', '-fno-strict-aliasing', '-I.', '-I..', '-I/usr/include', '-I/usr/include/python2.7', '-I/usr/include/x86_64-linux-gnu/python2.7', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_SSL=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DNDEBUG', '-D_FORTIFY_SOURCE=2', '../src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc', '-c', '-o', 'src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc.1.o']
>>>> [1698/1763] cxxprogram: build/src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc.1.o -> build/src/ndnSIM/tools/ns3-dev-rocketfuel-maps-cch-to-annotaded-debug
>>>> 11:32:23 runner ['/usr/bin/g++', '-pthread', '-Wl,-Bsymbolic-functions', '-Wl,-z,relro', 'src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc.1.o', '-o', '/home/cawka/ndnSIM/ns-3/build/src/ndnSIM/tools/ns3-dev-rocketfuel-maps-cch-to-annotaded-debug', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--no-as-needed', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L/usr/lib', '-L/usr/lib', '-lns3-dev-ndnSIM-debug', '-lns3-dev-visualizer-debug', '-lns3-dev-point-to-point-debug', '-lns3-dev-internet-debug', '-lns3-dev-mpi-debug', '-lns3-dev-bridge-debug', '-lns3-dev-wifi-debug', '-lns3-dev-propagation-debug', '-lns3-dev-mobility-debug', '-lns3-dev-topology-read-debug', '-lns3-dev-network-debug', '-lns3-dev-core-debug', '-lrt', '-lboost_graph-mt', '-lboost_system-mt', '-lboost_signals-mt', '-lboost_filesystem-mt', '-lssl', '-lcrypto', '-lpython2.7']
>>>>
>>>>
>>>> ---
>>>> Alex
>>>>
>>>>> On May 10, 2013, at 1:34 AM, Cesar Ghali <cghali at uci.edu> wrote:
>>>>>
>>>>> Hi Alex,
>>>>>
>>>>> I forked the git://github.com/NDN-Routing/ndnSIM.git repo and I'm using the feature/with-openssl branch. When I build, I am still getting (undefined reference to `SHA1') which means that the crypto lib is not being linked. I also can't see it in the compile command:
>>>>>
>>>>> Build failed
>>>>> -> task in 'rocketfuel-maps-cch-to-annotaded' failed (exit status 1):
>>>>> {task 163377036: cxxprogram rocketfuel-maps-cch-to-annotaded.cc.1.o -> ns3-dev-rocketfuel-maps-cch-to-annotaded-optimized}
>>>>> ['/usr/bin/g++', '-pthread', '-Wl,-Bsymbolic-functions', '-Wl,-z,relro', 'src/ndnSIM/tools/rocketfuel-maps-cch-to-annotaded.cc.1.o', '-o', '/home/cesar/Documents/ndnSIM/ns-3/build/src/ndnSIM/tools/ns3-dev-rocketfuel-maps-cch-to-annotaded-optimized', '-Wl,-Bstatic', '-Wl,-Bdynamic', '-Wl,--no-as-needed', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L.', '-L/usr/lib', '-L/usr/lib', '-lns3-dev-ndnSIM-optimized', '-lns3-dev-visualizer-optimized', '-lns3-dev-point-to-point-optimized', '-lns3-dev-internet-optimized', '-lns3-dev-mpi-optimized', '-lns3-dev-bridge-optimized', '-lns3-dev-wifi-optimized', '-lns3-dev-propagation-optimized', '-lns3-dev-mobility-optimized', '-lns3-dev-topology-read-optimized', '-lns3-dev-network-optimized', '-lns3-dev-core-optimized', '-lrt', '-lboost_graph-mt', '-lboost_system-mt', '-lboost_signals-mt', '-lboost_filesystem-mt', '-lpython2.7']
>>>>>
>>>>> I checked the wscript file in the ndnSIM root folder (in feature/with-openssl branch) and it includes adding a link to crypto lib, but I don't know why it is not showing in the g++ command.
>>>>>
>>>>> Thanks for the help,
>>>>> Cesar
>>>>>
>>>>>
>>>>>> On 05/09/2013 10:20 AM, Cesar Ghali wrote:
>>>>>> Thanks Alex,
>>>>>>
>>>>>> I will try it and will let you know.
>>>>>>
>>>>>> Cesar
>>>>>>
>>>>>>
>>>>>>> On 05/08/2013 07:19 PM, Alex Afanasyev wrote:
>>>>>>> Hi Cesar,
>>>>>>>
>>>>>>> In waf, adding external dependencies is a little bit simpler, though not as obvious.
>>>>>>> I pushed a small change to ndnSIM repo to the feature/with-openssl branch, which added a dependency (necessary compiler and linker flags) for ndnSIM.
>>>>>>>
>>>>>>> Can you try this branch?
>>>>>>>
>>>>>>> ---
>>>>>>> Alex
>>>>>>>
>>>>>>>
>>>>>>> On May 8, 2013, at 7:03 PM, cghali at uci.edu wrote:
>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> I am trying to use openssl with ndnSIM. I spend the last several hours
>>>>>>>> trying to link the crypto library with waf and I finally managed to do it.
>>>>>>>> Apparently, adding the libray to LINKFLAGS_EXTRA did not help, although
>>>>>>>> -lcrypto is added to the g++ build command (which can be verified using
>>>>>>>> the verbose mode when running waf). The way how I fixed it is by adding
>>>>>>>> this line at the beginning of the build function in wscript
>>>>>>>>
>>>>>>>> bld.env['LIB_PYEMBED'] = bld.env['LIB_PYEMBED'] + ["crypto"]
>>>>>>>>
>>>>>>>> For some reason the crypto library should be linked at the end, that's why
>>>>>>>> I appended it to LIB_PYEMBED which is being evaluated at the end. Is there
>>>>>>>> a clean way to do this?
>>>>>>>>
>>>>>>>> Thanks for the help,
>>>>>>>> Cesar
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> ndnSIM mailing list
>>>> ndnSIM at lists.cs.ucla.edu
>>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>>
>>> _______________________________________________
>>> ndnSIM mailing list
>>> ndnSIM at lists.cs.ucla.edu
>>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>>
>> _______________________________________________
>> ndnSIM mailing list
>> ndnSIM at lists.cs.ucla.edu
>> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20150215/dbe360d8/attachment.html>
More information about the ndnSIM
mailing list