diff -Naur opensc-0.12.0-svn-r4706/src/pkcs15init/myeid.profile opensc-0.12.0-svn-r4706-aventra/src/pkcs15init/myeid.profile
--- opensc-0.12.0-svn-r4706/src/pkcs15init/myeid.profile	2010-09-10 03:14:18.000000000 +0300
+++ opensc-0.12.0-svn-r4706-aventra/src/pkcs15init/myeid.profile	2010-09-22 18:39:37.000000000 +0300
@@ -53,8 +53,8 @@
 PIN user-puk {
     min-length = 4;
     max-length = 8;
-    attempts	= 10;
-    flags       = needs-padding;
+    attempts   = 10;
+    flags      = needs-padding;
 }
 
 PIN so-pin {
@@ -80,7 +80,7 @@
     DF MF {
         path  = 3F00;
         type  = DF;
-        acl	  = CREATE=$SOPIN,DELETE=NONE;
+        acl	  = CREATE=$PIN, DELETE=$SOPIN;
 
     	# This is the DIR file
         EF DIR {	    
@@ -92,13 +92,13 @@
         DF PKCS15-AppDF {
  	        type      = DF;
 	        file-id   = 5015;
-            acl       = DELETE=NONE, CREATE=$SOPIN;
+            acl       = DELETE=$SOPIN, CREATE=$PIN;
 	    
             EF PKCS15-ODF {
         	    file-id   = 5031;
                 structure = transparent;
         	    size      = $odf-size;
-	            acl       = READ=NONE, UPDATE=$SOPIN, DELETE=$SOPIN;
+	            acl       = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN;
         	}
 
             EF PKCS15-TokenInfo {
@@ -152,40 +152,40 @@
             EF template-private-key {
                 type      = internal-ef;
     	        file-id   = 4B01;	
-    	        acl       = CRYPTO=$PIN, UPDATE=$PIN, DELETE=$SOPIN, GENERATE=$PIN;
+    	        acl       = CRYPTO=$PIN, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN;
             }
             
             EF template-public-key {
                 structure = transparent;
                 file-id	  = 5501;
-                acl	      = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN, GENERATE=$PIN;
+                acl	      = READ=NONE, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN;
             }
 
             EF template-certificate {
                 file-id   = 4301;
                 structure = transparent;
-                acl       = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN;
+                acl       = READ=NONE, UPDATE=$PIN, DELETE=$PIN;
             }
 
             template key-domain {
                 # This is a dummy entry - pkcs15-init insists that
                 # this is present
                 EF private-key {
-                    file-id   = 4B00;
+                    file-id   = 4B01;
                     type      = internal-ef;
-                    acl       = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN, GENERATE=$PIN;
+                    acl       = READ=NONE, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN;
                 }
                 EF public-key {
-                    file-id	  = 5500;
+                    file-id	  = 5501;
                     structure = transparent;
-                    acl       = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN, GENERATE=$PIN;
+                    acl       = READ=NONE, UPDATE=$PIN, DELETE=$PIN, GENERATE=$PIN;
                 }
 		
                 # Certificate template
                 EF certificate {
-                    file-id	  = 4300;
+                    file-id	  = 4301;
                     structure = transparent;
-                    acl       = READ=NONE, UPDATE=$PIN, DELETE=$SOPIN;
+                    acl       = READ=NONE, UPDATE=$PIN, DELETE=$PIN;
                 }
             }
 	    }
diff -Naur opensc-0.12.0-svn-r4706/src/pkcs15init/pkcs15-myeid.c opensc-0.12.0-svn-r4706-aventra/src/pkcs15init/pkcs15-myeid.c
--- opensc-0.12.0-svn-r4706/src/pkcs15init/pkcs15-myeid.c	2010-09-10 03:14:18.000000000 +0300
+++ opensc-0.12.0-svn-r4706-aventra/src/pkcs15init/pkcs15-myeid.c	2010-09-22 17:51:08.000000000 +0300
@@ -31,7 +31,7 @@
 #include "pkcs15-init.h"
 #include "profile.h"
 
-#define KEEP_AC_NONE_FOR_INIT_APPLET
+#undef KEEP_AC_NONE_FOR_INIT_APPLET
 
 #define MYEID_MAX_PINS   14
 
