OpenSSL and Perl

I've been working on Xyne's feature requests for Pacgraph.  He thought it would be cool if there were some way to quickly explore the dependencies of stuff and how packages fit together.
Here's an interesting relationship:  OpenSSL and Perl.  If you chase OpenSSL's deps all the way down to glibc, you'll find it needs 135Mb.  The single biggest dep is Perl, at 38Mb.  I would hope Perl is important to its function.
Searching the net found a Gentoo bug report about this.  It was closed as CantFix because "the stupid build system uses perl".  As a binary distro, it sounds like Perl should be a makedep.  (Assuming the build system is unchanged.  The bug report was from 5 years ago.)
Searching "pacman -Ql openssl" reveals exactly one Perl script:  /etc/ssl/misc/CA.pl and it's associated manpage.  Also present is a shell script (/etc/ssl/misc/CA.sh) which does the same thing (but does not have a manpage).
Is there any reason to have a Perl dependency for just this one duplicated script?  Am I missing something?  I know tweaks to OpenSSL  should not be taken lightly, we would not want to end up like Debian.

They removed a portion of the PRNG to make it debugger friendly.  This broke the keygen for Debian/Ubuntu/friends.  Here is a more detailed summary of the Debian mess: http://www.links.org/?p=328
From CA.pl's manpage:
The CA.pl script is a perl script that supplies the relevant command line arguments to the openssl command for some common certificate operations.  It is intended to simplify the process of certificate creation and management by the use of some simple options.
Personally, I've never used it for creating certs.  I've never seen it referenced in any SSL tutorial or guide.  Beyond the man page, it is mentioned once on OpenSSL's site.
http://rt.openssl.org/Ticket/Display.ht … pass=guest
The dev's say the Perl script is only there for systems lacking Bash, mainly just Windows.  Do we need this dependency just for Window's sake?
Last edited by keenerd (2009-06-01 01:36:06)

Similar Messages

  • Sed and perl not replacing a letter in a file

    I have a file 1.htm. I want to replace a letter ṣ (s with dot below). I tried with both sed and perl and it does not replace.
    sed -i 's/ṣ/s/g' "1.htm"
    perl -i -pe 's/ṣ/s/g' "1.htm"
    can anyone suggest what to do
    1.html

    Perl also has that operator, but it usually goes by its alias tr (for transliteration). y is provided if you want to use that instead, but I don't think it will help; keep reading to find out why.
    \x{0323} is a special Perl-specific syntax for Unicode character U+0323 (COMBINING DOT BELOW). Since 323 is its Unicode code point, not a byte value, that won't tell you what encoding you're using. (In UTF-8, that character becomes the 2-byte sequence cca3, which is what you'll see if you examine the file with a dumb viewer like xxd.) Fortunately, since it comes through correctly, you know Perl is properly set up and isn't trying to use some weird encoding to read your file, or interpreting it as just bytes. This makes your job in principle much easier.
    However, you'll notice that Perl doesn't recognize ṣ as a single character. That's because the way your file is encoded, it isn't one character: it's an s followed by the Unicode character U+0323. This is a valid way to represent the glyph ṣ using Unicode, but it doesn't treat that glyph as a single character (in, for instance, tr/foo/bar/). Since tr can only do one-to-one character transliteration, you can't use it to transform ṣ (2 characters) into s (one character) while doing other similar transformations in one pass.
    One thing you might do is to simply strip out all the U+0323 characters:
    s/\x{0323}//g
    # or as I would write it,
    s/\N{COMBINING DOT BELOW}//g
    which would leave you with just the ASCII remaining for those glyphs that use it. This works for ṛ, ṣ, and ṇ (for instance), but it will not work on ā, and you can't use a similar tactic there because ā in your file is not made by combining the ASCII 'a' with U+0305 COMBINING OVERLINE, but is in fact a single Unicode character, U+0101 (LATIN SMALL LETTER A WITH MACRON).
    To make a long story even longer, there is a Unicode character for ṣ (U+1E63 LATIN SMALL LETTER S WITH DOT BELOW), which does not appear in your 1.htm file, but is the character you will get if you copy and paste from this forum (at least, it works that way for me). So if you typed or pasted "s/ṣ/s/g" into your perl or sed command, whether or not it would have the desired effect depends on which form of the ṣ glyph your input method gives you.
    If this is a one-off, quick script, I'd write something like the following: (incomplete!)
    #!/usr/bin/perl -p -i.bak
    tr/ā/a/; # here add all multibyte characters that you want to transliterate
    s/
    \N{COMBINING DOT BELOW} | # this should take care of ḌḍḤḥḶḷṆṇṚṛṢṣṬṭ
    \N{COMBINING CANDRABINDU} # this should take care of l̐
    # add other combining characters that you want to get rid of here
    //gx;
    I added ā to the tr/// as an example; if you don't actually want to replace ā in the file, you'll want to remove that part. Without seeing the other files or knowing how they were created (different encoders produce the same glyphs in different ways), I couldn't say with certainty which of the glyphs you want to replace are represented by a single Unicode code point and which ones are represented by a letter + a combining diacritic or other mark, so you'll have to examine your files (or the encoder that generated them) to see which ones you have to deal with in which way.
    You can use this tool to look up a UTF-8 byte sequence like "cc a3" to get its Unicode code point and name. Again, you'll have to examine the file with something like xxd to see the bare bytes, since any editor will probably present them as characters.
    You may also wish to investigate the Text::Unidecode module on CPAN; I can't say for sure whether it will do what you want, but maybe it's close enough.

  • ABAP field symbols and PERL reference variables to unnamed arrays.

    Rob -
    Please do NOT delete this post even though it contains this link:
    ABAP field symbols and PERL reference variables to unnamed arrays.
    to a question I posted in the Scripting Languages forum.
    It's a question that should be of interest to ABAP programmers, and they may miss if they don't frequent the SL forum ...
    Thanks for your forbearance here (in advance, of course) ...
    Best
    djh
    Edited by: Rob Burbank on Jul 11, 2011 1:26 PM

    If interested, please reply in the original thread. We don't want multiple conversations at cross purposes do we?
    Rob

  • Difference between OpenSSL and JCE+JCA API

    Hi,
    can anybody explain me, what are the differences between the OpenSSL
    and the JC*-API?
    Or can u do everything with the JC*-API like
    u can do it with the OpenSSL?
    thanx,
    edo

    what is actually the problem of this question.
    Or why nobody want to give me some answers?
    hmmmmm?
    hmmm?
    hmm?
    hm?
    h?
    Is this really a goddam-question or what is the problem?

  • Does the SCCM updates manager use OpenSSL, and is it vulnerable to the Heartbleed bug?

    I'm 99.99% positive I know the answer, but my boss wants to know for SURE. Does the SCCM updates manager use OpenSSL, and is it vulnerable to the Heartbleed bug?
    Thank you for appeasing him.

    I must be misunderstanding something here. Would you please help me understand why this isn't answerable here? How does this have anything to do w/ our TAM? SCCM is SCCM regardless of where we got it, right? I'm quite perplexed, so thank you for
    clearing this up.
    My guess is liability. What if we're wrong? Very few people who frequent these forums are actual Microsoft employees.
    If you want a 'for sure' answer, you're best off contacting Microsoft directly IMHO.
    Don't retire TechNet! -
    (Don't give up yet - 12,830+ strong and growing)

  • Difference between Java and Perl?

    I'm new to Java and was wondering what is the difference between Java and Perl. Other than Java has to be compiled and Perl does not. Is one better than the other? Here is a link to my website. The languaged used is Perl. Can Java be used to write a program like this.
    http://www.i2r2.co.nr

    Perl - interpreted
    Java - compiled (essentially -- there is no eval statement)
    Perl - lots functionality built into the bare language
    Java - more functionality moved into libraries
    (both have huge libraries available though -- and Java's core language seems to get bigger with each new release)
    Perl - loosely typed
    Java - strongly typed
    IMHO:
    Perl - Baroque ornate language good for quick scripts
    Java - Calvinist spartan language good for huge projects
    I can't think of anything else to say that can't be expressed in one-liners.

  • CGI and Perl

    I am new to the forum and know just enough to be dangerous.
    Before I bought CS4 Design Premium, I'd been teaching myself CGI
    and Perl. I am operating on Windows XP and have the Apache Server
    and Perl on my desktop for testing my website before I upload
    everything to my webserver. My webserver supports Perl.
    I have been able to create a simple form that collects my
    name and email address and, a very simple Perl script, returns the
    info to me in a new HTML page. (The purpose of which is to just
    make sure my technology is working.) When I place the .shtml file
    in my apache httdocs folder and my perl file into the apache
    cgi-bin folder, I can make it all work with
    "localhost/myfile.shtml" in my browser. In other words, I can fill
    in the form, hit submit and a new page is returned in the browser
    with the appropriate information.
    I created both these pages in Dreamweaver and just saved them
    to the appropriate locations.
    However, when I try to run the same process in Dreamweaver
    Live View, it doesn't work so well. I can get the page and fill it
    out, but when I hit submit, nothing happens.
    I have the site set up with a Test Server pointing to the
    apache/httdocs folder where I put the .shtml file. I can see the
    form in Live View with both the "use local files" and with "use the
    Test Server" options. But can't get the page to respond in either.
    Can anybody point me in the right direction for
    troubleshooting? I've been trolling the web for a couple of days
    now (including Adobe documentation) looking for the right answer. I
    don't have a separate application server on my desktop as I'm not
    looking to access a database at the moment.
    Thank you.
    decostj

    decostj wrote:
    > I thought Live View was designed to show my interactive
    pages work properly
    > right in Dreamweaver instead of going "outside" the
    program to test. Is this
    > not so?
    As long as you have a testing server correctly defined in
    your site,
    Live View shows the output of dynamic pages, such as those
    created by
    PHP, ColdFusion, or another server-side language. It also
    shows
    client-side dynamic features, such as JavaScript widgets.
    However, it's
    not a substitute for testing in a browser. Although it shows
    the output
    of a database query, it won't, for example, process user
    input and
    update the database. Nor will it take you to another page
    when you click
    a link.
    David Powers, Adobe Community Expert
    Author, "The Essential Guide to Dreamweaver CS4",
    "PHP Solutions" & "PHP Object-Oriented Solutions"
    http://foundationphp.com/

  • OCIEnvNLSCreate using Cygwin and Perl

    Hi
    I have Cygwin 1.5.25 installed with Oracle 10g Client on Windows XP Professional. I have installed DBD::Oracle (1.21) and Perl 5.8
    Here is my environment
    ORACLE_HOME C:\oracle\product\10.2.0\client_2
    LD_LIBRARY_PATH %ORACLE_HOME%\bin
    TNS_ADMIN %ORACLE_HOME%\NETWORK\ADMIN\tnsnames.ora
    NLS_LANG AMERICA_AMERICA.WE8DEC
    ORACLE_SID CBDEV
    TWO_TASK CBDEV (available in tnsnames.ora)
    ORA_NLS10 C:\oracle\product\10.2.0\client_2\nls\data
    SQLPLUS %ORACLE_HOME%\BIN
    Cygwin picks up all the above variables at startup
    sqlplus <uname/passwd>@CBDEV also works from the cygwin shell
    However below script, which uses Perl DBI to connect to same database to retrieve data fails with error posted below.
    I googled for this error and from all posted threads, changed permissions on ORACLE_HOME/BIN and ORACLE_HOME/LIB. Also did the same for entire ORACLE_HOME directory
    ANY input would be appreciated. I did not find a separate forum for Perl, hence posted on this forum!!
    Thanks
    #!/usr/bin/perl
    use strict;
    use DBI;
    print "Getting Data\n";
    my $RefHash = &getData();
    $ENV{ORACLE_SID} = "CBDEV";
    $ENV{ORACLE_HOME} = "/oracle/product/10.2.0/client_2";
    $ENV{NLS_LANG} = "AMERICAN_AMERICA.WE8DEC";
    $ENV{ORA_NLS} = $ENV{ORACLE_HOME}."/ocommon/nls/admin/data";
    $ENV{LD_LIBRARY_PATH} = $ENV{ORACLE_HOME}."/lib";
    $ENV{ORA_NLS10} = '/oracle/product/10.2.0/client_2/nls/data';
    sub getData() {
    my($name, $id, $phylocId);
    my %RefHash;
    my $dbh = DBI->connect('DBI:Oracle:CBDEV', '<uname>', '<passwd>') || die "Error ".DBI->errstr;
    my $sql = qq(SELECT 'name' from DUAL);
    my $sth = $dbh->prepare($sql);
    $sth->execute();
    $sth->bind_columns(\$name);
    while($sth->fetch()) {
    $name=~s/\s+//g;
    $RefHash{$name}='1';
         print "Name : $name ", $RefHash{$name}, "\n";
    return \%RefHash;
    exit;
    Output of Perl -V
    Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
    Platform:
    osname=cygwin, osvers=1.5.24(0.15642), archname=cygwin-thread-multi-64int
    uname='cygwin_nt-5.1 reini 1.5.24(0.15642) 2007-01-31 10:57 i686 cygwin '
    config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Uusemymalloc -Doptimize=-O3 -Dman3ext=3pm -Dusesitecustomize -Dusedevel'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=define use5005threads=undef useithreads=define usemultiplicity=define
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=define use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    Compiler:
    cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement',
    optimize='-O3',
    cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement'
    ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers=''
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
    ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
    Linker and Libraries:
    ld='ld2', ldflags =' -s -L/usr/local/lib'
    libpth=/usr/local/lib /usr/lib /lib
    libs=-lgdbm -ldb -ldl -lcrypt -lgdbm_compat
    perllibs=-ldl -lcrypt -lgdbm_compat
    libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a
    gnulibc_version=''
    Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s'
    cccdlflags=' ', lddlflags=' -s -L/usr/local/lib'
    Characteristics of this binary (from libperl):
    Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
    PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV
    USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES
    USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE
    Locally applied patches:
    CYG01 - hints.cygwin.sh ldflags -s
    CYG02 - lib-ExtUtils-Embed insensitive against leading \s
    CYG03 - lib-Test-Harness-Straps $ENV{PERL5LIB} = ''
    CYG04 - major.version.cygwin.sh cygperl-5_8.dll and not cygperl-5_8_x.dll
    CYG05 - add Win32CORE to core
    CYG07 - File-Spec-Cygwin-TMPDIR.patch
    Bug#38628 - allow legacy Cwd->cwd()
    Bug#40103 - File-Spec-case_tolerant.patch from 5.9.5
    Built under cygwin
    Compiled at Jul 8 2007 19:12:08
    %ENV:
    PERL5LIB=
    /usr/lib/perl5/5.8/cygwin
    /usr/lib/perl5/5.8
    /usr/lib/perl5/site_perl/5.8/cygwin
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/site_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8/cygwin
    /usr/lib/perl5/vendor_perl/5.8
    /usr/lib/perl5/vendor_perl/5.8

    Thanks for those 2 tips.
    I set TNS_ADMIN accordingly and removed calls to set the environment variables in the script.
    I still continue to encounter the OCIEnvNlsCreate error as before
    Here's the modified script and the output
    #!/usr/bin/perl
    use strict;
    use DBI;
    print "Testing DBD::Oracle \n";
    my @driver_names = DBI->available_drivers;
    foreach my $driver_name (@driver_names) {
    print $driver_name,"\n";
    foreach (DBI->data_sources($driver_name)) {
    print "*****",$_,"\n";
    my $cHash = &getCytoband();
    sub getCytoband() {
    my($name, $id, $phylocId);
    my %cytobHash;
    my $dbh = DBI->connect('DBI:Oracle:CBDEV', 'dunston', 'rocks') || die "Error ".DBI->errstr;
    my $sql = qq(SELECT distinct ID, NAME,PHYSICAL_LOCATION_ID from CYTOBAND where PHYSICAL_LOCATION_ID is NOT NULL);
    my $sth = $dbh->prepare($sql);
    $sth->execute();
    $sth->bind_columns(\$id, \$name, \$phylocId);
    while($sth->fetch()) {
    $name=~s/\s+//g;
    $id=~s/\s+//g;
    $phylocId=~s/\s+//g;
    $cytobHash{$name}=$id."|".$phylocId;
    print "Name : $name ", $cytobHash{$name}, "\n";
    return \%cytobHash;
    exit;
    ************ OUTPUT *************
    Getting Cytoband
    DBM
    *****DBI:DBM:f_dir=.cpan
    *****DBI:DBM:f_dir=.texmf
    *****DBI:DBM:f_dir=acroread
    *****DBI:DBM:f_dir=apache-ant-1.6.5
    *****DBI:DBM:f_dir=apache-ant-1.7.0-bin
    *****DBI:DBM:f_dir=AppName
    *****DBI:DBM:f_dir=autorun
    *****DBI:DBM:f_dir=caBIO
    *****DBI:DBM:f_dir=cabioApp
    *****DBI:DBM:f_dir=cygwin
    *****DBI:DBM:f_dir=dell
    *****DBI:DBM:f_dir=Documents and Settings
    *****DBI:DBM:f_dir=Downloads
    *****DBI:DBM:f_dir=drivers
    *****DBI:DBM:f_dir=httpd-2.2.8
    *****DBI:DBM:f_dir=i386
    *****DBI:DBM:f_dir=indexes
    *****DBI:DBM:f_dir=jboss-4.0.4.GA
    *****DBI:DBM:f_dir=jboss-4.0.5.GA
    *****DBI:DBM:f_dir=MSOCache
    *****DBI:DBM:f_dir=MyApp
    *****DBI:DBM:f_dir=NALCache
    *****DBI:DBM:f_dir=NOVELL
    *****DBI:DBM:f_dir=oracle
    *****DBI:DBM:f_dir=Perl
    *****DBI:DBM:f_dir=Perl-Critic-1.082
    *****DBI:DBM:f_dir=Perl-Tidy-20071205
    *****DBI:DBM:f_dir=Program Files
    *****DBI:DBM:f_dir=RECYCLER
    *****DBI:DBM:f_dir=ruby
    *****DBI:DBM:f_dir=System Volume Information
    *****DBI:DBM:f_dir=Tcl
    *****DBI:DBM:f_dir=Temp
    *****DBI:DBM:f_dir=WINDOWS
    *****DBI:DBM:f_dir=.
    ExampleP
    *****dbi:ExampleP:dir=.
    File
    *****DBI:File:f_dir=.cpan
    *****DBI:File:f_dir=.texmf
    *****DBI:File:f_dir=acroread
    *****DBI:File:f_dir=apache-ant-1.6.5
    *****DBI:File:f_dir=apache-ant-1.7.0-bin
    *****DBI:File:f_dir=AppName
    *****DBI:File:f_dir=autorun
    *****DBI:File:f_dir=caBIO
    *****DBI:File:f_dir=cabioApp
    *****DBI:File:f_dir=cygwin
    *****DBI:File:f_dir=dell
    *****DBI:File:f_dir=Documents and Settings
    *****DBI:File:f_dir=Downloads
    *****DBI:File:f_dir=drivers
    *****DBI:File:f_dir=httpd-2.2.8
    *****DBI:File:f_dir=i386
    *****DBI:File:f_dir=indexes
    *****DBI:File:f_dir=jboss-4.0.4.GA
    *****DBI:File:f_dir=jboss-4.0.5.GA
    *****DBI:File:f_dir=MSOCache
    *****DBI:File:f_dir=MyApp
    *****DBI:File:f_dir=NALCache
    *****DBI:File:f_dir=NOVELL
    *****DBI:File:f_dir=oracle
    *****DBI:File:f_dir=Perl
    *****DBI:File:f_dir=Perl-Critic-1.082
    *****DBI:File:f_dir=Perl-Tidy-20071205
    *****DBI:File:f_dir=Program Files
    *****DBI:File:f_dir=RECYCLER
    *****DBI:File:f_dir=ruby
    *****DBI:File:f_dir=System Volume Information
    *****DBI:File:f_dir=Tcl
    *****DBI:File:f_dir=Temp
    *****DBI:File:f_dir=WINDOWS
    *****DBI:File:f_dir=.
    Gofer
    Oracle
    *****dbi:Oracle:BIODEV
    *****dbi:Oracle:CADEV
    *****dbi:Oracle:CBDEV
    *****dbi:Oracle:CBTEST
    *****dbi:Oracle:CGPROD
    *****dbi:Oracle:EXTPROC_CONNECTION_DATA
    *****dbi:Oracle:LPGDEV
    *****dbi:Oracle:LPGPROD
    *****dbi:Oracle:LPG_DEV
    *****dbi:Oracle:LPG_PROD
    Proxy
    Sponge
    DBI connect('CBDEV','dunston',...) failed: ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc. at tmp.pl line 25
    Error ERROR OCIEnvNlsCreate. Check ORACLE_HOME env var, NLS settings, permissions, etc. at tmp.pl line 25.

  • Yasql and perl-DBD-Oracle for RH7

    Hi
    I have installed yasql-1.61-1.noarch.rpm on RH7 but am having problems locating an appropriate perl-DBD-Oracle compatable with perl 5.6.0 for RH7.
    Any pointers (or alternatives) on getting this running for RH7 and perl 5.6.0 would be much appreciated.

    If you installed the base rdbms and PRO*C and Networking,
    BDB-Oracle-0.5[56789] should build out of the box.
    Follow the instructions in the READMEs and you should be fine.
    There is a mailing list (referenced in the DBD-Oracle docs)
    where you should be able to get help.
    For your TNS problem. Check to make sure
    that your listenr.ora and tnsnames.ora files are correct.
    Also, you might check that your listener is running.
    It looks like an install on a system not connected to
    a network does not do that - this will cause all kinds of
    TNS problems
    Garth
    Joao Pedro Gonalves (guest) wrote:
    : Hi, i've been trying to install Oraperl with no success,
    : firstly, i found out that there were missing header files
    : (oratypes.h... ) and got them out of an NT 7.x CD.
    : DBD::Oracle compiles finely but when i try to use it i get the
    : following error:
    : install_driver(Oracle) failed: Can't load
    : '/usr/lib/perl5/site_perl/i586-linux/auto/DBD/Oracle/Oracle.so'
    : for module DBD::Oracle: File not found at
    : /usr/lib/perl5/i586-linux/5.00404/DynaLoader.pm line 166.
    : Oracle.so was not created in any way by the DBD::Oracle so i
    : don't know what could be wrong.
    : I have set all the vars correctly (ORACLE_HOME, ORACLE_SID,
    etc)
    : BTW,
    : how do i get oracle to resolve names and why do i get this
    : message while trying to connect through the listener:
    : ORA-12505: TNS:listener could not resolve SID given in connect
    : descriptor
    : sqlplus seems to be sending "SID=*" , how do i change this out?
    : Thanks in advance,
    : joao
    null

  • Ruby and Perl NetWeaver RFC Connector

    This thread follow Piers blog <a href="/people/piers.harding/blog/2007/02/28/netweaver-rfc-gives-the-next-generation-ruby-and-perl-connectors RFC gives the Next generation Ruby and Perl Connectors</a>
    Post your comments, troubles and recommendations.
    Greetings,
    Blag.

    Ok....First problem -:'( I download and install the following gem...
    <b>sapnwrfc-0.07-mswin32.gem</b>
    Then....I create the .yml file...
    [code]
    ashost: Huroncebrio
    sysnr: "00"
    client: "000"
    user: bcuser
    passwd: minisap
    lang: EN
    trace: 2
    [/code]
    Then....My lovely <b>SE16</b> example....
    [code]
    specify a YAML base config file or pass connection
      parameters directly to rfc_connect()
    require 'sapnwrfc'
    SAPNW::Base.config_location = 'sap.yml'
    SAPNW::Base.load_config
    conn = SAPNW::Base.rfc_connect
    get the system and connection details
    attrib = conn.connection_attributes
    $stderr.print "Connection Attributes: #{attrib.inspect}\n"
    lookup the dictionary definition of an Function Module
    fds = conn.discover("RFC_READ_TABLE")
    $stderr.print "Parameters: #{fds.parameters.keys.inspect}\n"
    create an instance of a Function call
    fs = fds.new_function_call
    populate the parameters - structures and table
    #rows now take hashes of field name/value pairs
    fs.IMPORTSTRUCT = { 'query_table' => 'SPFLI',
                        'delimiter' => '|'}
    execute the RFC call
    fs.invoke
    $Fields = Array.new
    $Data = Array.new
    $Data_Fields = Array.new
    $Data_Split = Array.new
      itab.fields.hashRows {|field| $Fields.push(field) }
      $Fields_Len = $Fields.length
      itab.data.hashRows {|field| $Data.push(field.to_s.strip!) }
      $Data_Len = $Data.length
      for i in 0...$Data_Len
        $Data_Fields = $Data<i>
        $Data_Split = $Data_Fields.split("|")
        for i in 1...$Fields_Len
          print $Data_Split<i>.to_s.strip, "|"
        end
      print "\n\n" 
      end
      print "Exit"
    [/code]
    However....I getting the following error...
    <i>
    cannot load C Ext nwsaprfc.c
    </i>
    Greetings,
    Blag.

  • Java Applet and Perl - writing files

    OK. i need to be able to write a file to a folder on the webpage that the applet is on so that i can access these files for later use. i also understand that u need to use a server to do this. fortunately my web hostingsupports Perl but i don't know the first thing about it.
    i need someone to help me understand how to create a perl server so that the applet can write files.
    Can anyone show me either a thorough tutorial or explain it step by step as i do not know much about servers or servlets.

    I assume you are putting up an applet that can have a user search through his hard drive folders for a particular file, then want the file sent to a servlet on the server? If so, read up on the html tag <input type="file"
    and find some examples on how to use it. I dont know enough about applets to tell you how to do it with an applet.

  • [solved] openssl and gawk corrupted?

    I've just done pacman -Syu and it is what I've get:
    :: Retrieving packages from current...
    checking package integrity... archive openssl-0.9.8f-1-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    archive gawk-3.1.6-1-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    errors occurred, no packages were upgraded.
    Wtf? I don't want to ignore these packages because many other depends on them so my upgrade would by much less useful without them. Does anyone had similar problem? And if so: how was it solved?
    Last edited by szypul (2007-11-11 21:19:21)

    I've cleared cache but result is the same. I'll try to download from other mirror tomorrow.
    Edit:
    I've tried again and again, only thing I've get is more corrupted packages;/
    checking package integrity... archive openssl-0.9.8f-1-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    archive kernel26-2.6.23.1-6-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    archive gawk-3.1.6-1-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    archive pciutils-2.2.8-2-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    archive libldap-2.3.39-1-i686.pkg.tar.gz was corrupted (bad MD5 or SHA1 checksum)
    errors occurred, no packages were upgraded.
    Could anyone show me his pacman configuration files?
    Edit2:
    Ok, I've managed to solve my problem : ) It looks that the main reason was in openssl - when I upgrated it to the newest version(by doing what i found here) it all started to work just fine.
    Last edited by szypul (2007-11-11 21:18:46)

  • Updating Infotype 0105 "Communication" with SAPNWRFC and PERL (long !!)

    When I read the SAP-Press Book "mySAP HR: Technical Principles and Programming"
    (actually it was the german edition "Technische Grundlagen und Programmierung")
    I came across Chapter 9.1.3 "Using BAPIs", in which some sample code is provided
    for updating the email-adress in infotype 0105 "communication".
    I just thought: "OK, that could be easily (and better !) done with PERL and SAPNWRFC".
    My PERL-script should do the following:
    1) Read subtypes 0001 and 0010 from IT 0105 via RFC
    2) Compare that data against our LDAP-Server
    3) call the approbiate BAPIs for updating IT 0105 via RFC
    OK, here's the ABAP-code which accomplishes task #1: 
    [code]
    Z_EMAIL_TAB is a customer-defined structure with 3 components:
    component      component-type
    MY_PERNR       PERNR_D
    MY_NICKN       SYSID
    MY_EMAIL       COMM_ID_LONG
    FUNCTION z_read_email.
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(MY_DATE) TYPE  ENDDA OPTIONAL
    *"  TABLES
    *"      Z_EMAIL STRUCTURE  Z_EMAIL_TAB
      DATA: sql_date  TYPE begda,
            sql_mandt type mandt.
      DATA: BEGIN OF wa_ldap_out,
                     pernr TYPE pernr_d,
                     nickn TYPE sysid,
                     email TYPE comm_id_long,
            END OF wa_ldap_out.
      DATA: exc_ref    TYPE REF TO cx_sy_native_sql_error,
            error_text TYPE string.
      IF my_date IS INITIAL.
        MOVE sy-datum TO sql_date.
      ELSE.
        MOVE date TO sql_date.
      ENDIF.
    we use native SQL (Oracle), so we have to specify the mandant
    exclude-values for PERSK refer to pensionists etc
    move sy-mandt to sql_mandt.
    EXEC SQL.
      open dbcur for
          SELECT DISTINCT
                pa0001.pernr,
                pa0105_0001.usrid,
                pa0105_0010.USRID_LONG
           FROM pa0000 pa0000,
                pa0001 pa0001,
                pa0105 pa0105_0001,
                pa0105 pa0105_0010
            WHERE
                 pa0000.pernr =  pa0001.pernr and
                 pa0000.begda <= :sql_date AND
                 pa0000.endda >= :sql_date AND
                 pa0001.begda <= :sql_date AND
                 pa0001.endda >= :sql_date AND
                 pa0001.persk NOT IN ('12' ,'13' ,'17' ,'18') AND
                 pa0000.stat2 = '3' and
                 (pa0001.mandt = pa0105_0001.mandt() and pa0001.pernr = pa0105_0001.pernr() and pa0105_0001.usrty() = '0001' and pa0105_0001.begda() <= :sql_date and pa0105_0001.endda(+) >= :sql_date) and
                 (pa0001.mandt = pa0105_0010.mandt() and pa0001.pernr = pa0105_0010.pernr() and pa0105_0010.usrty() = '0010' and pa0105_0010.begda() <= :sql_date and pa0105_0010.endda(+) >= :sql_date) and
                 pa0000.mandt =  pa0001.mandt and
                 pa0000.mandt = :sql_mandt
    ENDEXEC.
    DO.
        EXEC SQL.
            FETCH NEXT dbcur into :wa_ldap_out
        ENDEXEC.
        IF sy-subrc <> 0.
            EXIT.
        ELSE.
            APPEND wa_ldap_out to z_email.
        ENDIF.
    ENDDO.
    EXEC SQL.
      close dbcur
    ENDEXEC.
    ENDFUNCTION.
    [/code]
    Using Native-SQL (we have an Oracle-Backend) saves us from looping through IT0105 twice.
    (I don't like ABAP's Open-SQL, it's too limited)
    Now we have a nice little table with all our employees pernr, userid and email-adress.
    Let's stay on the ABAP-side and have a look at the update-function (task #3):  
    [code]
    FUNCTION z_upd_smtp .
    ""Lokale Schnittstelle:
    *"  IMPORTING
    *"     VALUE(MY_PERNR) TYPE  PERNR_D
    *"     VALUE(MY_EMAIL) TYPE  AD_SMTPADR
    *"     VALUE(MY_DATE) TYPE  BEGDA OPTIONAL
    *"  TABLES
    *"      BAPIRETURN STRUCTURE  BAPIRETURN1
      DATA: wa_bapireturn TYPE bapireturn1.
      IF my_date IS INITIAL.
        MOVE sy-datum TO my_date.
      ENDIF.
      CALL FUNCTION 'BAPI_EMPLOYEET_ENQUEUE'
        EXPORTING
          number        = my_pernr
          validitybegin = my_date
        IMPORTING
          return        = wa_bapireturn.
      IF wa_bapireturn-type NE 'E'.
        CLEAR wa_bapireturn.
        CALL FUNCTION 'BAPI_EMPLCOMM_CREATE'
          EXPORTING
           employeenumber        = my_pernr
           subtype               = '0010'
           validitybegin         = my_date
           validityend           = '99991231'
           communicationid       = my_email
         NOCOMMIT              =
         IMPORTING
            return                = wa_bapireturn
         EMPLOYEENUMBER        =
         SUBTYPE               =
         OBJECTID              =
         LOCKINDICATOR         =
         VALIDITYBEGIN         =
         VALIDITYEND           =
         RECORDNUMBER          =
        APPEND wa_bapireturn TO bapireturn.
        CALL FUNCTION 'BAPI_EMPLOYEET_DEQUEUE'
          EXPORTING
            number        = my_persnr
            validitybegin = my_datum
          IMPORTING
            return        = wa_bapireturn.
        APPEND wa_bapireturn TO bapireturn.
      ELSE.
        APPEND wa_bapireturn TO bapireturn.
      ENDIF.
    ENDFUNCTION.
    [/code]
    And finally the PERL-Script (task #2):
    [code]
    ##### Connect to LDAP-server #################################################
    use Net::LDAP;
    use Net::LDAP::Control;
    use Net::LDAP::Constant qw(LDAP_CONTROL_PAGED);
    $pagec = Net::LDAP::Control->new( LDAP_CONTROL_PAGED,
                                      size => 1000);
    --- replace with your company-specific values ------------------------------ #
    $ldap = Net::LDAP->new( 'your-ldap-server' ) or die "$@";
    $mesg = $ldap->bind( 'CN=your-ldap-user,CN=aaaa,DC=bbbb,DC=dd,DC=eeeeeee,DC=fff',
                          password => 'your-password'
    use SAPNWRFC;
    --- Connection to SAP  ----------------------------------------------------- #
    SAPNW::Rfc->load_config("your-config-file");
    $sap_conn = SAPNW::Rfc->rfc_connect;
    --- SAP RFCs --------------------------------------------------------------- #
    SAP_RFCs();
    --- read all Email-adresses from IT0105 ------------------------------------ #
    $rd_handle_eml = $rd_eml->create_function_call;
    $rd_handle_eml->invoke();
    foreach $row_hashref_eml (@{$rd_handle_eml->Z_EMAIL}) {
         $MY_PERNR = $row_hashref_eml->{MY_PERNR};
         $MY_NICKN = $row_hashref_eml->;
         $MY_EMAIL = $row_hashref_eml->;
         $MY_NICKN =~ s/ //g;
         $MY_EMAIL =~ s/ //g;
         if ($MY_NICKN ne '') {
             $strMail_LDAP = nick2email(lc($MY_NICKN));
             if (lc($MY_EMAIL) ne lc($strMail_LDAP) && $strMail_LDAP ne '') {
                 updIT0105("$MY_PERNR","$strMail_LDAP");
                 print "SUCCESS = $i_uit_success, $MY_PERNR $strMail_LDAP\n";
         else {
    do some error-processing here
    $sap_conn->disconnect();
    exit;
    sub SAP_RFCs {
    --- Read E-Mail-Adress from IT0105 ----------------------------------------- #
    $rd_eml = $sap_conn->function_lookup("Z_READ_EMAIL");
    --- Update E-Mail-Adress in IT0105 ----------------------------------------- #
    $rd_uit = $sap_conn->function_lookup("Z_UPD_SMTP");
    sub nick2email {
        $strNickn = $_[0];
        $strEMail = '';
    --- our userid is stored in LDAP-item "mailnickname", just change filter to your needs #
        $filter = qq {
                      (& (mailnickname=$strNickn)
                         (givenName=*)
                         (| (objectCategory=person)
                            (objectClass=person)
        while (defined ($search = $ldap->search(
                                base   => "OU=your-base-OU,DC=bbbb,DC=dd,DC=eeeeeee,DC=fff",
                                filter => $filter,
                                attrs => ['mailNickname','mail','whenChanged'],
                                control => [ $pagec ]
            foreach $entry ($search->entries) {
                $strEMail = $entry->get_value('mail') ;
            ($resp) = $search->control( LDAP_CONTROL_PAGED );
            last unless ref $resp && $pagec->cookie($resp->cookie);
        return $strEMail;
    sub updIT0105 {
        $rd_handle_uit = $rd_uit->create_function_call;
        $rd_handle_uit->MY_PERNR($_[0]);
        $rd_handle_uit->MY_EMAIL($_[1]);
        $rd_handle_uit->invoke();
        $i_uit_success = 1;
        foreach $row_hashref_uit (@{$rd_handle_uit->BAPIRETURN}) {
            if ($row_hashref_uit->{TYPE} ne 'S' && $row_hashref_uit-> ne ' ') {
                $i_uit_success = 0;
    [/code]
    I run this script every Friday on a virtual Windows XP machine (VMWare) scheduled with the AT-Command
    and it works really fine, enjoy !!!
    P.S.: I hope there aren't any typos in the code, but please check
    P.P.S: Thanks again to Piers for SAPNWRC, fantastic.

    Hi,
    I am very interested in your solution. Can you send me the scripts?
    Greeting Jan

  • OpenSSL and java interaction

    Hi
    I am working on a project which requires me to use crypto library of OpenSSL. The calling program is Java. Does anyone have examples of OpenSSL interaction and java ?
    Thanks
    p

    In order of worst to best ideas for doing cryptography that is (or at least should be) compatible with
    OpenSSL:
    System.exec to call openssl binaries
    JNI to wrap calls to OpenSSL methods
    Not-Yet-Commons-SSL has some OpenSSL compatible stuff: http://juliusdavies.ca/commons-ssl/
    Just use the Java Cryptographic API using algorithms/params that are compatible with OpenSSL.
    It seems odd to have a requirement for a project that is written in Java to have to use a C library. If you want open source (free $$) and Java, go with BouncyCastle or Mozilla's JSS (which is FIPS approved, BTW).
    It's not too hard to find a common middle ground between such crypto toolkits as Microsoft CAPI, NSS, and OpenSSL.

  • In terms of efficiency and expandability, how does iPlanet Portal software differ from a portal written in PHP and PERL?

     

    In my opinion the fact that the portal uses primarily JAVA, lends itself to quite a bit of expandability. I think it will be quite difficult for a portal written in PHP (Such as PHP Nuke) to share user session and state information accross multiple machines/instances. The iPlanet portal server has been designed to accomodate this, through the use of specialised session services. The threading model in Java also lends itself to greater efficiency when executing multiple tasks, whereas a portal based on PERL, would have to start a new process everytime a service is requested, which can then become VERY resource intensive.
    In terms of expandability, the fact that it is contaned inside a JAVA VM will allow you to develop and deploy alot of custom developed applications for your portal. There is also quite a good portal API for the iPlanet portal server that will allow you to tap into the Logging,Session,Profile and Authentication services provided by the portal.
    Hope this helps!

Maybe you are looking for

  • Place contents of xml file to 2D array

    i have a xml file like <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE map SYSTEM "map.dtd"> <map width="5" height="5" goal="6" name="Hallways of Dooom">      <random-item type='lantern' amount='5' />      <random-item type='health' amount='10' />  

  • Fail to lookup jndi in EJB

    Hi, My application failed to lookup a JMS Object using JNDI lookup in EJB. The actual application flow is that a Servlet receive a request which then calls to an EJB where it loop up the JMS object to establish the message queue connection. It works

  • Does Power BI has similar feature as Power Pivot Gallery in SharePoint 2013?

    Hi, I have a data model in an Excel file, and I would like to publish it to the Power Pivot Gallery, so other people can connect to the data model in their workbooks and create their own visualizations.  How do you achieve this in Power BI? Thanks, H

  • Download "not applicable?"

    I am brand new to Photoshop.  I purchased the PS Elements/ Premiere Elements bundle, but the PE download says "not applicable".  My pc is new and runs on Windows 8.  Help please!

  • Change output target

    How can I change the output SWF target for Run, Debug and Profile? I want to have different run configurations for each that output different SWFs?