1010
1111public class AccountSettings {
1212 private String certificate ;
13- private Certificate cert ;
13+ private Certificate idp_cert ;
1414 private String idp_sso_target_url ;
1515
1616 public String getCertificate () {
@@ -30,18 +30,18 @@ public void setIdpSsoTargetUrl(String idp_sso_target_url) {
3030 * Loads certificate from a base64 encoded string
3131 * @param certificate an base64 encoded string.
3232 */
33- public void loadCertificate () throws CertificateException {
33+ public void loadCertificate (String certificate ) throws CertificateException {
3434 CertificateFactory fty = CertificateFactory .getInstance ("X.509" );
3535 ByteArrayInputStream bais = new ByteArrayInputStream (Base64 .decodeBase64 (certificate .getBytes ()));
36- cert = fty .generateCertificate (bais );
36+ this . idp_cert = fty .generateCertificate (bais );
3737 }
3838
3939
40- public Certificate getCert () throws CertificateException {
41- if (cert == null ){
42- loadCertificate ();
40+ public Certificate getIdpCert () throws CertificateException {
41+ if (this . idp_cert == null ){
42+ loadCertificate (this . certificate );
4343 }
44- return cert ;
44+ return this . idp_cert ;
4545 }
4646
4747 /**
@@ -52,7 +52,7 @@ public Certificate getCert() throws CertificateException {
5252 public Certificate getCert (byte [] certificate ) throws CertificateException {
5353 CertificateFactory fty = CertificateFactory .getInstance ("X.509" );
5454 ByteArrayInputStream bais = new ByteArrayInputStream (Base64 .decodeBase64 (certificate ));
55- cert = fty .generateCertificate (bais );
56- return cert ;
55+ idp_cert = fty .generateCertificate (bais );
56+ return idp_cert ;
5757 }
5858}
0 commit comments