[PATCH] 630 Fixed PKCS12Export output.
The PKCS12Export has been modified such that if an error occurs in normal mode it will display the error message and in debug mode it will display the full stack trace. The code has also been refactored such that it can be reused as a library in addition to command-line tool. The code will now throw exceptions instead of exiting to the system. https://fedorahosted.org/pki/ticket/1224 -- Endi S. Dewata
Reviewed for the purposes intended, refactoring and error handling. Looks good. If tested to of course work, ACK Just a minor question. It looks like there are a bunch of methods changed from private to public. I assume this is because we are encapsulating the whole thing into a class. Also there are a couple of methods that don't have public or private, etc type declared. Anyway, it might be decent to take a quick look to make sure there are no methods that should actually be private and of no concern to the outside world. If so, just fix and submit. ----- Original Message -----
From: "Endi Sukma Dewata" <edewata@redhat.com> To: "pki-devel" <pki-devel@redhat.com> Sent: Monday, July 13, 2015 7:42:33 PM Subject: [Pki-devel] [PATCH] 630 Fixed PKCS12Export output.
The PKCS12Export has been modified such that if an error occurs in normal mode it will display the error message and in debug mode it will display the full stack trace.
The code has also been refactored such that it can be reused as a library in addition to command-line tool. The code will now throw exceptions instead of exiting to the system.
https://fedorahosted.org/pki/ticket/1224
-- Endi S. Dewata
_______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
On 7/14/2015 8:20 PM, John Magne wrote:
Reviewed for the purposes intended, refactoring and error handling. Looks good.
If tested to of course work, ACK
Thanks. Pushed to master.
Just a minor question.
It looks like there are a bunch of methods changed from private to public. I assume this is because we are encapsulating the whole thing into a class.
Yes, since PKCS12Export will work as a library it needs to have a public interface. The public methods are setters & getters, generatePKCS12Data(), initDatabase(), and exportData(). These are the methods that the user will call as shown in main().
Also there are a couple of methods that don't have public or private, etc type declared.
Without the modifiers these methods now become package-private. So they are still kind of private without being too restrictive. With this modifier these methods can be now be reused by other class or overridden by a subclass in the same package. I suppose in the future these methods will eventually be refactored into a PKCS12 class and reused by PKCS12Export and PKCS12Import, and then we move these classes into a separate pkcs12 package.
Anyway, it might be decent to take a quick look to make sure there are no methods that should actually be private and of no concern to the outside world.
If so, just fix and submit.
I think the package-private is fine since we're only storing directory/file paths in the class. These methods do not modify/expose the internal data. -- Endi S. Dewata
participants (2)
-
Endi Sukma Dewata -
John Magne