Project

General

Profile

Tâche #16180

Distribution EOLE - Scénario #16058: Traitement express (19-21)

Problème d'importation d'un certificat PNCN sans la chaine sur Sphynx 2.5.2 migré depuis un Sphynx 2.4.2 déjà configuré pour la PNCN

Added by David BRIDONNEAU over 7 years ago. Updated over 7 years ago.

Status:
Fermé
Priority:
Normal
Start date:
05/25/2016
Due date:
% Done:

100%

Estimated time:
3.00 h
Spent time:
Remaining (hours):
0.0

Description

Problème se produisant sur un Sphynx 2.5.2 migré depuis un Sphynx 2.4.2 configuré pour la PNCN.

Lors de l'importation du certificat sans la chaine, Arv renvoie une erreur comme quoi l'AC n'est pas présente en base.
Pourtant lorsque l'on fait un init_pncn, l'AC est bien présente.

Vu avec Fabrice Barconnière : il y a un bug dans le script /usr/lib/python2.7/dist-packages/arv/db/node.py ligne 278

En commentant les 2 lignes ça passe.

Cependant, on ne peut toujours pas créer de tunnel ensuite car Arv ne trouve pas le certificat. Si on fait "ajouter un certificat", ARv nous répond que le certificat existe déjà.

Code concerné (extrait mail sur liste Amon-Sphynx) :

il y a peut-être un bug dans ARV. En effet, la fonction *bin_encoding* a du être revue suite à l'évolution des outils fournis par strongSwan.
cette fonction est utilisée dans *arv/db/node.py* ligne 275 pour calculer le subject de l'issuer et vérifier si le certificat cet issuer est présent ou non dans la base.

Exceptionnellement et dans l'urgence, vous pouvez commenter les 2 lignes suivantes et relancer ARV pour permettre l'ajout du certificat :
if ca == None:
           raise Exception("CA does not exists in database, Can't add certificate")

Fichier PEM :

Message d'erreur : "L'AC n'existe pas dans la base, ne peut ajouter le certificat" 

Fichier PKCS7 :

Je viens de tester, de mon côté j'ai une autre erreur lorsque j'essaie d'importer un certificat sur mes 2 Sphynx 2.5.2 : "error in add_cred_auth: Credential with same name already exists" 

Fichier PKCS12 :

quand j'essaie un PKCS12 j'ai l'erreur "Cannot read pkcs12: Error in execution 'openssl pkcs12' command" 

upgrade_certificates_subject_field.py View - Script Python pour dépannage urgent (654 Bytes) Fabrice Barconnière, 05/27/2016 02:27 PM


Related issues

Related to arv - Tâche #16185: Erreur d'importation pkcs12 sur Sphynx 2.5.2 - certificat PNCN Fermé 05/26/2016
Related to arv - Tâche #16184: Impossible d'importer un certificat PNCN sur Sphynx 2.5.2 Fermé 05/26/2016

Associated revisions

Revision 993ae12c (diff)
Added by Fabrice Barconnière over 7 years ago

Upgrade des subjects des certificats suite à la disparition de l'outil
id2sql fournit par les anciennes versions de strongSwan

db/version.py :
  • nouvelle table DbVersion (arv_db_version_dbversion)
    • champ version en text unicode
config.py :
  • variable arv_db_version = u'1.0.0' pour le première version versionnée d'ARV
posttemplate/00-arv :
  • upgrade du subject avec la fonction bin_encoding refactorée en 2.5.2
  • gestion de la verion de la base de donnée ARV

ref #16180 @8h
ref #16184
ref #16185

History

#1 Updated by Fabrice Barconnière over 7 years ago

  • Tracker changed from Demande to Tâche
  • Project changed from Sphynx to arv
  • Subject changed from Problème d'importation d'un certificat PNCN sans la chaine sur Sphynx 2.5.2 to Problème d'importation d'un certificat PNCN sans la chaine sur Sphynx 2.5.2 migré depuis un Sphynx 2.4.2 déjà configuré pour la PNCN
  • Description updated (diff)
  • Estimated time set to 3.00 h
  • Parent task set to #16058
  • Remaining (hours) set to 3.0

#2 Updated by Fabrice Barconnière over 7 years ago

  • Status changed from Nouveau to En cours

#3 Updated by Fabrice Barconnière over 7 years ago

  • Assigned To set to Fabrice Barconnière

#4 Updated by Fabrice Barconnière over 7 years ago

  • % Done changed from 0 to 50

Répondu par mail sur la liste pour traiter le problème dans l'urgence : http://pcll.ac-dijon.fr/listes/arc/amon-sphynx/2016-05/msg00073.html

#6 Updated by Olivier FEBWIN over 7 years ago

Parfait, ça fonctionne !
Merci beaucoup

#7 Updated by Olivier FEBWIN over 7 years ago

...mais toujours pas pour l'import de pkcs12 mais c'est beaucoup moins urgent du coup

#8 Updated by Fabrice Barconnière over 7 years ago

  • % Done changed from 50 to 100
  • Remaining (hours) changed from 3.0 to 0.1

#9 Updated by Fabrice Barconnière over 7 years ago

  • Status changed from En cours to Résolu

#10 Updated by Joël Cuissinat over 7 years ago

Validé par l'utilisateur

#11 Updated by Joël Cuissinat over 7 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.1 to 0.0

Also available in: Atom PDF