diff options
Diffstat (limited to 'pith/smkeys.c')
-rw-r--r-- | pith/smkeys.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pith/smkeys.c b/pith/smkeys.c index c6feb567..17357378 100644 --- a/pith/smkeys.c +++ b/pith/smkeys.c @@ -255,7 +255,7 @@ smime_get_cn(X509_NAME *subject) { char buf[256]; X509_NAME_ENTRY *e; - e = X509_NAME_get_entry(subject, X509_NAME_entry_count(subject)-2); + e = X509_NAME_get_entry(subject, X509_NAME_entry_count(subject)-1); if(e) X509_NAME_get_text_by_OBJ(subject, e->object, buf, sizeof(buf)); return cpystr(buf); |