Hello,

To be more specific about my original post, in the
command: 

lib/cmds/confirm_revreq

I found this code, with my own comments added :)

##It checks first the two crins entered are equal
if ( $crin ne $crin2 ) {
        configError (gettext ("CRIN codes are
different, go back and check it."));
} elsif ($crin) {

##Then it creates a hash of the crin, my question is
##How is this digest created? I haven't got any
similar
## to this :-(

        my $hashed_crin = $cryptoShell->getDigest (
DATA => $crin, ALGORITHM => "sha1" );

##I guess this queries the DB looking for the PIN we
##have stored there for every certificate, in the DB
##I have found something like this in the data field  
##for the certificate table
##
##-----BEGIN HEADER-----
##PIN=5e86d229d29e4f856f9b798cad5fe007808c6afc
##CSR_SERIAL=2848 ROLE=User -----END HEADER----- -
##
##
        ## get the informations about the crin
        my $pin     =
$cert->getParsed()->{HEADER}->{PIN};

##The it check if the PIN I guess the one that is
##stored in the DB is equal to the crin after the hash
##but I didn't got any hash similar to the PIN in the
##DB
        ## check the crin
        if ($pin ne $hashed_crin) {

How can I obtain the right hash? or at least the one
equals to the PIN in the DB? or is there any other way
to check that the CRIN that the user enters is correct
for that certificate?

Thanks,
Johnny

 --- Johnny Gonzalez <[EMAIL PROTECTED]>
escribió:

> Hello everybody,
> 
> I need to insert a CRR from java, so I need to get
> the
> hash of the CRIN to compare it with the PIN stored
> in
> the DB for that certificate, is that ok? I'm trying
> to
> obtain the digest through openssl but it isn't the
> same as the one I got from the db, can anyone point
> me
> to the exact openssl command to obtain the digest?
> 
> I'm executing this command:
> openssl dgst -sha1 CRIN11
> SHA1(CRIN11)=
> db61f83ee19208bbc976ba9685b4f686efd22018
> 
> but the result is different from what I have in the
> DB
> 
> PIN in db:
> 5e86d229d29e4f856f9b798cad5fe007808c6afc
> 
> any ideas?
> thanks a lot,
> Johnny
> 
> 
>               
> ______________________________________________ 
> Renovamos el Correo Yahoo! 
> Nuevos servicios, más seguridad 
> http://correo.yahoo.es
> 
> 
>
-------------------------------------------------------
> This SF.Net email is sponsored by: NEC IT Guy Games.
>  How far can you shotput
> a projector? How fast can you ride your desk chair
> down the office luge track?
> If you want to score the big prize, get to know the
> little guy.  
> Play to win an NEC 61" plasma display:
> http://www.necitguy.com/?r=20
> _______________________________________________
> OpenCA-Devel mailing list
> OpenCA-Devel@lists.sourceforge.net
>
https://lists.sourceforge.net/lists/listinfo/openca-devel
> 



                
______________________________________________ 
Renovamos el Correo Yahoo! 
Nuevos servicios, más seguridad 
http://correo.yahoo.es


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.  How far can you shotput
a projector? How fast can you ride your desk chair down the office luge track?
If you want to score the big prize, get to know the little guy.  
Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20
_______________________________________________
OpenCA-Devel mailing list
OpenCA-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openca-devel

Reply via email to