From 59cd95af2c31e5480eed2c3594fe83a442bc1d7b Mon Sep 17 00:00:00 2001 From: okir Date: Mon, 8 Apr 2002 15:46:27 +0000 Subject: [PATCH] - SO PIN path was not propagated to the caller git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@497 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs15init/pkcs15-gpk.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/pkcs15init/pkcs15-gpk.c b/src/pkcs15init/pkcs15-gpk.c index 62c3ed5d..1624e754 100644 --- a/src/pkcs15init/pkcs15-gpk.c +++ b/src/pkcs15init/pkcs15-gpk.c @@ -228,10 +228,14 @@ gpk_init_app(struct sc_profile *profile, struct sc_card *card, r = gpk_init_pinfile(profile, card, pinfile); sc_profile_get_pin_info(profile, SC_PKCS15INIT_SO_PIN, &sopin_info); - if (r >= 0 && sopin_info.reference != -1) + if (r >= 0 && pin_len) { r = gpk_new_pin(profile, card, &sopin_info, 0, pin, pin_len, puk, puk_len); + if (r >= 0) + sc_profile_set_pin_info(profile, SC_PKCS15INIT_SO_PIN, + &sopin_info); + } sc_file_free(pinfile); return r;