/** * Creates a user with user name and associated {@link UsmUser}. * @param userName * the user name of the new entry. * @param user * the <code>UsmUser</code> representing the security information of the * user. */ public UsmUserEntry(OctetString userName, UsmUser user) { this.userName = userName; this.usmUser = user; if (user.isLocalized()) { if ((user.getAuthenticationProtocol() != null) && (user.getAuthenticationPassphrase() != null)) { authenticationKey = user.getAuthenticationPassphrase().getValue(); if ((user.getPrivacyProtocol() != null) && (user.getPrivacyPassphrase() != null)) { privacyKey = user.getPrivacyPassphrase().getValue(); } } } }
/** * Creates a user with user name and associated {@link UsmUser}. * @param userName * the user name of the new entry. * @param user * the <code>UsmUser</code> representing the security information of the * user. */ public UsmUserEntry(OctetString userName, UsmUser user) { this.userName = userName; this.usmUser = user; if (user.isLocalized()) { this.engineID = user.getLocalizationEngineID(); if ((user.getAuthenticationProtocol() != null) && (user.getAuthenticationPassphrase() != null)) { authenticationKey = user.getAuthenticationPassphrase().getValue(); if ((user.getPrivacyProtocol() != null) && (user.getPrivacyPassphrase() != null)) { privacyKey = user.getPrivacyPassphrase().getValue(); } } } }
/** * Creates a user with user name and associated {@link UsmUser}. * @param userName * the user name of the new entry. * @param user * the <code>UsmUser</code> representing the security information of the * user. */ public UsmUserEntry(OctetString userName, UsmUser user) { this.userName = userName; this.usmUser = user; if (user.isLocalized()) { this.engineID = user.getLocalizationEngineID(); if ((user.getAuthenticationProtocol() != null) && (user.getAuthenticationPassphrase() != null)) { authenticationKey = user.getAuthenticationPassphrase().getValue(); if ((user.getPrivacyProtocol() != null) && (user.getPrivacyPassphrase() != null)) { privacyKey = user.getPrivacyPassphrase().getValue(); } } } }
if ((engineID != null) && (engineID.length() > 0)) { if (user.getAuthenticationProtocol() != null) { if (user.isLocalized()) { authKey = user.getAuthenticationPassphrase().getValue(); if (user.isLocalized()) { privKey = user.getPrivacyPassphrase().getValue(); if (user.isLocalized()) { userEngineID = user.getLocalizationEngineID();
if (user.isLocalized()) { authKey = user.getAuthenticationPassphrase().getValue(); } else { if (user.isLocalized()) { privKey = user.getPrivacyPassphrase().getValue(); } else { if (user.isLocalized()) { userEngineID = user.getLocalizationEngineID(); } else {
if (user.isLocalized()) { authKey = user.getAuthenticationPassphrase().getValue(); if (user.isLocalized()) { privKey = user.getPrivacyPassphrase().getValue(); if (user.isLocalized()) { userEngineID = user.getLocalizationEngineID();
protected UsmUserEntry addLocalizedUsmUserEntry(OctetString engineID, OctetString securityName, UsmUserEntry entry) { OID authProtocolOID = entry.getUsmUser().getAuthenticationProtocol(); OID privProtocolOID = entry.getUsmUser().getPrivacyProtocol(); if (authProtocolOID != null) { byte[] authKey; if (entry.getUsmUser().isLocalized()) { authKey = entry.getUsmUser().getAuthenticationPassphrase().getValue(); } else { authKey = securityProtocols.passwordToKey(authProtocolOID, entry.getUsmUser().getAuthenticationPassphrase(), engineID.getValue()); } byte[] privKey = null; if (privProtocolOID != null) { if (entry.getUsmUser().isLocalized()) { privKey = entry.getUsmUser().getPrivacyPassphrase().getValue(); } else { privKey = securityProtocols.passwordToKey(privProtocolOID, authProtocolOID, entry.getUsmUser().getPrivacyPassphrase(), engineID.getValue()); } } entry = addLocalizedUser(engineID.getValue(), securityName, authProtocolOID, authKey, privProtocolOID, privKey); } return entry; }
break; case colUsmUserLocalizationEngineID: setValue(column, (userEntry.getUsmUser().isLocalized()) ? userEntry.getUsmUser().getLocalizationEngineID() : null); break;
break; case colUsmUserLocalizationEngineID: setValue(column, (userEntry.getUsmUser().isLocalized()) ? userEntry.getUsmUser().getLocalizationEngineID() : null); break;
if (!entry.getUsmUser().isLocalized()) { entry = addLocalizedUsmUserEntry(engineID, securityName, entry);
if (authProtocolOID != null) { byte[] authKey; if (entry.getUsmUser().isLocalized()) { authKey = entry.getUsmUser().getAuthenticationPassphrase().getValue(); if (entry.getUsmUser().isLocalized()) { privKey = entry.getUsmUser().getPrivacyPassphrase().getValue();
if (authProtocolOID != null) { byte[] authKey; if (entry.getUsmUser().isLocalized()) { authKey = entry.getUsmUser().getAuthenticationPassphrase().getValue(); if (entry.getUsmUser().isLocalized()) { privKey = entry.getUsmUser().getPrivacyPassphrase().getValue();