RFC6487 & RFC 6488 compliance changes

First fix checks if the signedAttributes field of a CMS object conforms to the rfc (rfc6488 section-2.1.6.4)
The second fix changes the isPrintable function to check for the ASN.1 PrintableString type (rfc6487 section-4.4) instead of using a regex.