-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhh_hsm.txt
75 lines (45 loc) · 1.72 KB
/
hh_hsm.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Dígito control Dian
#######################################
https://actualicese.com/herramientas/digito-verificacion/
# Generar CSR
#######################################
ppmk --list | grep -i 890924034
nit="8909240345-3"
echo ${nit}
ppmk --new ${nit}
generatekey -m 1 pkcs11 certreq=yes plainname=${nit} protect=softcard softcard=${nit} recovery=yes type=RSA size=2048 nvram=no
embedsavefile: Filename to write key to? []
> 9007000618-2
[default sha1] > sha256
mv ${nit}_req ${nit}.csr
scp root@cfdi04:/home/ad/jsansaloni/${nit}.csr .
sincro simulaput secworld
sincro put secworld
# Tarea ref. https://apps.edicomgroup.com/JSys/#idstask|173716
# IMPORTAR CERT A ECS
#######################################
nit=""
echo ${nit}
scp ${nit}.pem root@cfdi04:/home/ad/jsansaloni
soft=$(find /opt/nfast/kmdata/local -name *$(ppmk -l | grep $nit | awk '{print $1}')* | grep key_pkcs11_uc | cut -d '_' -f3) ;
echo $soft
ckcerttool -c $nit -f $nit.pem -k $soft -L $nit
cklist -s $nit
sincro simulaput secworld
sincro put secworld
reinicios --> TomcatFirma
Importamos en ECS:
Accedo a http://cfdi03:9124/EdicomCryptoServer/webfirma
Miramos número de serie del certificado:
Dispositivos > NSHIELD > Informacion Token
Introduzco en Label (${nit}) para obtener el Numero de Serie del Certificado:
# TAREA REF https://apps.edicomgroup.com/JSys/#idstask|204614
-----
Change pin sloot
pkcs11-tool -l --module /opt/nfast/toolkits/pkcs11/libcknfast.so --slot-description '9006350888-2' --change-pin
# Logging in to "9006350888-2".
# Please enter User PIN: current_pass
# Please enter the current PIN: current_pass
# Please enter the new PIN: new_pass
# Please enter the new PIN again: new_pass
# PIN successfully changed